drip-php
drip-php copied to clipboard
415 error - Unsupported Media Type
I had some issues with content-type.
now it is set to:
$req_params = [
'timeout' => $this->timeout,
'connect_timeout' => $this->connect_timeout,
'headers' => [
'User-Agent' => $this->user_agent(),
'Accept' => 'application/json, text/javascript, */*; q=0.01',
'Content-Type' => 'application/vnd.api+json',
],
'http_errors' => false,
];
When I changed it to 'Content-Type' => 'application/json', everything is fine.
Could you please check this?
My Error was:
array(1) {
["message"]=>
string(22) "Unsupported Media Type"
}
I had the same issue and the same fix solved the problem.
Does this happen for both the shopper activity and other APIs, or does it only throw this error on Shopper Activity? Also if the latter, is this still the case? We may have fixed this on the server.