Skip to content

Instantly share code, notes, and snippets.

@vajahath
Created February 25, 2016 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vajahath/010ef2c93b2b2237d204 to your computer and use it in GitHub Desktop.
Save vajahath/010ef2c93b2b2237d204 to your computer and use it in GitHub Desktop.
jquery > post an object. Stringification is important!
$.ajax({
type: 'POST',
url: 'http://localhost:3000/auth/google/authCodeHandler',
contentType: 'application/json; charset=utf-8',
success: function (result) {
// Handle or verify the server response.
console.log(result);
},
processData: false,
data: JSON.stringify({code: authResult['code']})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment