Search code examples
javarestcurlparse-platformparse4j

REST API Parse.com Java


I am going through REST API GUIDE given by http://www.parse.com

There the doc says about creating objects and storing it in a parse via CURL and Python API calls.

The CURL request for creating object using POST request looks like below:

curl -X POST \
  -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
  -H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}' \
  https://api.parse.com/1/classes/GameScore

I wanted to know how can I send request like this using Java.


Solution

  • There is a number of Parse.com third-party API libraries:

    From https://parse.com/docs/api_libraries

    JAVA

    • Almonds — A Java REST API that mimics the Android API.
    • mobile-parse-api — This library implements the REST API of parse.com in java with open interfaces for libgdx and playN.
    • Parse4J — Library for the REST API.
    • ParseFacade — Parse Android SDK alternative.

    You might want to evaluate them before making your own interface to parse.com