Parse's API says to use a curl request. I want to use AJAX

I am creating an object using Parse's API and am confused on how and where to use it in my Javascript code. **Parse API:** This is an *example* of how to create an object stated in Parse's API: curl -X POST \ -H "X-Parse-Application-Id: bLAj1fl7B77TZYo1zv9vIAiUgC19RXgpzsFZeVgM" \ -H "X-Parse-REST-API-Key: PPrIdiqZXMHT1JwveI2AdhsAhGpx7WjXfvYTSYXh" \ -H "Content-Type: application/json" \ -d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}' \ I'm trying to use AJAX to send a POST request which appends some text to a list item. **My Javascript code:**{ // Submitting text from a textbox $.ajax({ url : '', // What is className? type: 'POST', data: text.val(), // Text the user inputted in a textbox error: function (data) { console.log('error'); }, success: function (data) { $('ul').append('
  • ' + data + '
  • '); } }); }); How and where would I use the curl request like the example in my code? Also, I do not know what Parse means by 'className' in the url key. If the ul's class name that I wanted the text to appear in was called "message" then would url key in my AJAX request be ''? Any help is appreciated! Thanks

    以上就是Parse's API says to use a curl request. I want to use AJAX的详细内容,更多请关注web前端其它相关文章!

    赞(0) 打赏
    未经允许不得转载:web前端首页 » JavaScript 答疑

    评论 抢沙发

    • 昵称 (必填)
    • 邮箱 (必填)
    • 网址

    前端开发相关广告投放 更专业 更精准