Requesting a Resource

Making a Request


Send a POST request to your instance. Include the url of the resource to be retrieved and the callback URL to where the response should be sent.

You can optionally provide a headers parameter defining headers to send when retrieving the resource.

The collection of headers can contain whatever keys and values you need to satisfy a request. This might include specifying the User-Agent, passing along Authorization or setting Cookies.

Name Description Example
url URL of the resource to be retrieved
callback URL to which the resource should be sent
headers JSON-encoded key:value pairs {"User-Agent":"Chrome, honest"}
parameters JSON-encoded parameters {"cookies":{"domain": "…"}}

Curl Example Without Headers

curl -X POST http://localhost:8001/ \
     -d 'url='


Curl Example With Headers

curl -X POST http://localhost:8001/ \
     -d 'url={"User-Agent":"Chrome"}'


Understanding The Response

Successful Request (200)

The response body ("118e35f631be802c41bec5c9dfb0f415" in the very first example) is a json-encoded request ID.

The request ID is unique to the combination of url, headers and parameters.

Store the request ID in your application. The request ID is sent with the requested resource to the given callback URL. Use the request ID to map the response you receive to the request that you made.

Bad Request (400)

Your request will receive a HTTP 400 response if:

  • url is empty
  • callback is empty
  • callback is not valid (which depends on your configuration for allowed callback host names)