0.1.2 • Published 9 years ago

post-json-nicely v0.1.2

Weekly downloads
1
License
MIT
Repository
-
Last release
9 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

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago