Skip to content

415 error - Unsupported Media Type #33

@jakubiak

Description

@jakubiak

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions