Last active
August 23, 2016 23:52
-
-
Save dotku/fe5fa671376dcdf6d6559753150fd1d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://stackoverflow.com/questions/6323338/jquery-ajax-posting-json-to-webservice | |
| http://stackoverflow.com/questions/21201270/how-to-submit-json-data-by-request-body-in-jquery | |
| $.ajax({ | |
| url : "/", | |
| type: "POST", | |
| data: JSON.stringify([ | |
| {id: 1, name: "Shahed"}, | |
| {id: 2, name: "Hossain"} | |
| ]), | |
| contentType: "application/json; charset=utf-8", | |
| dataType : "json", | |
| success : function(){ | |
| console.log("Pure jQuery Pure JS object"); | |
| } | |
| }); | |
| // sample api: https://api.ipify.org?format=json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment