Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
jQuery: How to post with a json body
_data =
foo: 23
bar: 42
bazz: null
url: _path
type: "POST"
data: JSON.stringify( _data )
contentType: "application/json; charset=utf-8"
dataType: "json"
success: ( model ) =>
# todo
error: ->
# todo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment