0

I am getting the following response when I try to poll the url : "The response is plain."

How can I get only the url or get the entire data in json format?

HTTP/1.1 201 Created
Cache-Control: private
Content-Type: application/json
Date: Wed, 15 Jun 2016 17:37:08 GMT
Location: http://partners.api.skyscanner.net/apiservices/pricing/sg1/v1.0/d33ed2cb519c42379f765614341274f8_ecilpojl_691C03C565B7657815CF2C9FCC3B2730
Content-Length: 2

{}
cdomination
  • 605
  • 1
  • 7
  • 25
Udit
  • 383
  • 5
  • 15
  • 2
    If you go to the url given in the response it complains about the API key. Perhaps that's the problem? – Anonymous Jun 15 '16 at 17:44
  • @Anonymous I've tried this in postman and I got no reponse. This is what I got by using curl. The doc from skyscanner says you have to poll the url from response header – Udit Jun 15 '16 at 18:08

1 Answers1

1

So the URL to get the prices is in the Location field in the headers (as you've pasted here).

You then take this URL, append your API key, and the price response should be in plain JSON from a GET request.

Sessions do run out though, so you'll need to keep making new ones every so often as you test.

Happy to follow up if you need any more info.

David Low
  • 61
  • 3