drip-php icon indicating copy to clipboard operation
drip-php copied to clipboard

415 error - Unsupported Media Type

Open jakubiak opened this issue 5 years ago • 2 comments

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"
  }

jakubiak avatar Nov 04 '20 08:11 jakubiak

I had the same issue and the same fix solved the problem.

bsuchecki avatar Nov 05 '20 12:11 bsuchecki

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.

will-in-wi avatar Nov 10 '20 22:11 will-in-wi