You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I would suggest changing your payload to include the correct Guzzle payload, including json. We just don't include this to add flexibility with the payload to include form_params as an alternative for example.
But we could probably pass in the correct header as well - I'll look into that. But this would still be considered the correct payload format according to Guzzle.
Describe the bug
Using the newly added Fedex client, I am getting this back from the API:
UNSUPPORTED.MEDIA.TYPE.ERROR
.See details below:
Steps to reproduce
Create the fedex client and connect - all fine.
In a plugin, do:
$data = Consume::$plugin->getService()->fetchData('fedex', 'POST', '/track/v1/trackingnumbers', $payload);
with $payload being:
with XXX being a valid tracking number.
Error in the logs:
Now if you use Guzzle instead and do this with the same payload:
You get the correct response, no error.
Is it the
Content-Type' => 'application/json
that's missing in the Consume call?Craft CMS version
4.4.16.1
Plugin version
1.0.8
Multi-site?
No
Additional context
No response
The text was updated successfully, but these errors were encountered: