hitmeister / api-sdk-php

Kaufland.de Onlineshop (former real.de and Hitmeister) API SDK for PHP
https://www.real.de/api/v1/
MIT License
24 stars 29 forks source link

Missing 'Accept' Header #116

Open Das-Ente opened 3 years ago

Das-Ente commented 3 years ago

According to the documentation, the 'Accept' header must be set for all requests.

https://www.kaufland.de/api/v1/?page=rest-api

Required Headers Each request must contain 4 headers: Accept - All requests must contain an Accept header set to application/json.

If this is not set, the PATCH "https://www.kaufland.de/api/v1/units/xxxxxxxxxxxx/" call will not result in an HTTP 404, but in an HTTP 405. Also the response is then not a JSON, but an XML.

<html>
    <head>
        <title>405 Not Allowed</title>
    </head>
    <body>
        <center>
            <h1>405 Not Allowed</h1>
        </center>
        <hr>
        <center>nginx</center>
    </body>
</html>
Das-Ente commented 3 years ago

Real_API_header.patch.txt