Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get emty {} body as result #10

Open
mtmibjas opened this issue Sep 21, 2020 · 3 comments
Open

Get emty {} body as result #10

mtmibjas opened this issue Sep 21, 2020 · 3 comments

Comments

@mtmibjas
Copy link

mtmibjas commented Sep 21, 2020

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
Copy link
Owner

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

@kimpoy010
Copy link

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

@AhmadRaju007
Copy link

AhmadRaju007 commented May 2, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants