Expedia API book.api.ean.com blank

前端 未结 1 1846
别跟我提以往
别跟我提以往 2020-12-17 06:02

Im looking to book a hotel with expedia api

https://book.api.ean.com/

but the url is always blank,

details here using rest/json

http://deve

相关标签:
1条回答
  • 2020-12-17 06:45

    Try urlencoding each querystring parameter:

    customerUserAgent=Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.83 Safari/535.11
    
    arrivalDate=12/10/2012
    

    The customerUserAgent url param should be url encoded:

    customerUserAgent=Mozilla%2F5.0%20(Windows%20NT%206.1)%20AppleWebKit%2F535.11%20(KHTML%2C%20like%20Gecko)%20Chrome%2F17.0.963.83%20Safari%2F535.11
    
    arrivalDate=12%2F10%2F2012
    

    Take a look at PHP's urlencode for more information.

    Also, be sure to remove the spaces between each querystring param, not sure if it was copy/paste issue or not.

    0 讨论(0)
提交回复
热议问题