Skip to content

Instantly share code, notes, and snippets.

@wbbradley
Last active December 17, 2015 23:19
Show Gist options
  • Save wbbradley/5688733 to your computer and use it in GitHub Desktop.
Save wbbradley/5688733 to your computer and use it in GitHub Desktop.
Just some notes on ajax queries

XHR

model = {
  property_a: 'hello',
  property_b: 'world'
};

xhr=jQuery.ajax({type:'post', dataType:'json', url:'http://localhost:8000/api/...', data:JSON.stringify(model),'contentType':'application/json'})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment