yamdraco / lalamove-php

20 stars 12 forks source link

Get emty {} body as result #10

Open mtmibjas opened 4 years ago

mtmibjas commented 4 years ago

The following code help me to fix the issue....

$quotationResult = $request->quotation($quotationBody); $quotationResult->getBody()->rewind(); $getQuotation = strval($quotationResult->getBody()->getContents()); getQuotationMessage = json_decode($getQuotation);

yamdraco commented 4 years ago

I believe you might be getting 401. You would need to check the http status code instead of body.

kimpoy010 commented 4 years ago

any idea how can I get sandbox API keys to test the APIs?

AhmadRaju007 commented 3 years ago

Hello, I am getting status code 200 and an empty body. Thanks to @mtmibjas for your little solution.