0.1.2 • Published 11 years ago

post-json-nicely v0.1.2

Weekly downloads
1
License
MIT
Repository
-
Last release
11 years ago

a preferrable api for posting JSON using jquery

postJson ($, url, javascriptObject)

JSON.stringifies javascriptObject and posts it to url.

returns a promise

example usage

myRequest = postJson($, '/json', {hi:'hey'})
myRequest.done(
	(data, ...) -> console.log 'server says:', data)
myRequest.fail(
	(jqXHR, textStatus, err) -> alert 'post req failed!', jqXHR)
myRequest.always(
	() -> console.log 'made a post req')
0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago