highsidelabs / walmart-api-php

PHP SDK for Walmart's Marketplace Partner, Content Provider, and 1P Supplier APIs.
https://highsidelabs.co
BSD 3-Clause "New" or "Revised" License
22 stars 19 forks source link

getAllItems() trows error if header is 'application/xml' on getAllItemsRequest #24

Open Malaganus opened 5 months ago

Malaganus commented 5 months ago

The method getAllItems() throws Fatal error: Uncaught TypeError: Walmart\Apis\MP\MX\ItemsApi::getAllItemsWithHttpInfo(): Return value must be of type Walmart\Models\MP\MX\Items\ItemResponses

The response from WM is with all correct data but not in the correct or expected format, because the response is in XML and ItemsApi->getAllItemsWithHttpInfo() try to do a json_decode on the XML response string.

amanmishra003 commented 5 months ago

hey i am having similar issue while connecting, always ends up in [NULL response] exception is it bec ause it is doing json decode ? @Malaganus