javascript - Parse's API says to use a curl request. I want to use AJAX -
I am creating an object using parse API and how and how it will be used in my javascript code. >
Parse API: How to create an object given in a parse API, this is an example : I send a postal request using AJAX I'm trying to add some items to the list item. My Javascript code: How and how I am in my code As an example, will the curl use the request? Also, I do not know that the parse means the ' As is'. If UL class name which I have called her "message" wanted to show the text will URL keys in my AJAX request ''? appreciated any help Thank you You use something like Demo:
Curl -X Post \ -H "X-Parse-Application-ID: bLAj1fl7B77TZYo1zv9vIAiUgC19RXgpzsFZeVgM" \ -H "X-Pars-Rest-API-Key: PPRIDXXHH 1JwveI2AdhsAhGpx7WjXfvYTSYXh" \ -H "Content Type: Application / Jason" \ -d '{"score": 1337, "player name": "scene plot", "cheat mode": incorrect}' \ https://api.parse.com/1/classes/GameScore
button. Click (function () {// $ .ajax ({url: 'https://api.parse.com/1/classes/<className>', // What is a classname? Type: 'Post', Data : Text.val (), // Text error written by the user in a text box: Function (data) {console.log ('error');}, success: function (data) {$ ('ul') ( Li & gt; '+ data +' & lt; / li & gt; ';}}}};});
$. Ajax to need ({url: 'https://api.parse.com/1/classes/TestObject', type: 'POST', contentType: 'application / json', header: {X-parse-application -id ':' bLAj1fl7B77TZYo1zv9vIAiUgC19RXgpzsFZeVgM ',' X-parse-rest-API key ':' PPrIdiqZXMHT1JwveI2AdhsAhGpx7WjXfvYTSYXh ' }, Data: JSON.stringify ({Key: 'value:. '+ New date () getTime ()}), error: function (data) {console.log (' error ');}, success:. Function (data) {console.log ( 'success', data) attached $ ( 'ul') ( '& lt; li & gt;' + JSON.stringify (data) + '& Lt; / li & gt;' );}});
Comments
Post a Comment