Skip to content

Instantly share code, notes, and snippets.

@danielfttorres
Last active March 3, 2016 03:32
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 danielfttorres/76a8730a49f398b4d1de to your computer and use it in GitHub Desktop.
Save danielfttorres/76a8730a49f398b4d1de to your computer and use it in GitHub Desktop.
// WRONG
$http.post(URL + '/subscribe', { "email": "test@email.com" })
// RIGHT
$http({
url: URL + '/subscribe',
method: "POST",
data: { "email": "test@email.com" },
headers: {'Content-Type': 'application/x-www-form-urlencoded' }
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment