Verified Commit d57c7f91 authored by Elias Häußler's avatar Elias Häußler 🐛
Browse files

[BUGFIX] Use correct header name for content type of JSON requests

parent 688a5c36
Pipeline #783 passed with stages
in 2 minutes and 52 seconds
......@@ -57,7 +57,7 @@ trait RemoteServiceTrait
{
$request = $this->requestFactory->createRequest('POST', $this->uri)
->withBody(Stream::create(json_encode($payload)));
$headers = array_merge($headers, ['Accept' => 'application/json']);
$headers = array_merge($headers, ['Content-Type' => 'application/json']);
foreach ($headers as $name => $value) {
$request = $request->withHeader($name, $value);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment