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

415 error - Unsupported Media Type #33

Open
jakubiak opened this issue Nov 4, 2020 · 2 comments
Open

415 error - Unsupported Media Type #33

jakubiak opened this issue Nov 4, 2020 · 2 comments

Comments

@jakubiak
Copy link

jakubiak commented Nov 4, 2020

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 jakubiak changed the title 415 error 415 error - Unsupported Media Type Nov 4, 2020
@bsuchecki
Copy link

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

@will-in-wi
Copy link
Contributor

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.

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

3 participants