我正在使用Parse RESTful API。我想在使用Ajax发送GET请求时附加一些约束,但是他们网站上的示例都是用curl
编写的,例如:
curl -X GET \
-H "X-Parse-Application-Id: IWphomqAahPnmElGbu8k8NlXvyCCf3YItYZRD03X" \
-H "X-Parse-REST-API-Key: 2RodxwlOfr1U124ZFu6yBN8bJHvDWoVc60srbOW9" \
-G \
--data-urlencode 'where={"playerName":"Sean Plott","cheatMode":false}' \
https://api.parse.com/1/classes/GameScore
我不知道Ajax中的--data-urlencode
等价物。我已经尝试将--data-urlencode
之后的约束放入Ajax调用data
,但它不起作用。