Today I was trying to execute API call with Guzzle to another service.
But the problem is that if I do the request locally to that service, it works fine.
it should be mentioned that when the service was at Modx such error still reproduced. Currently service is replaced by Laravel app.
But when I do the request from the dev server if fails with following error:
`GET http://example.com/api/v1/products?codes=1` resulted in a `415 Unsupported Media Type` response:
production.ERROR: #0 /home/..../vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttpExceptionRequestException::create(Object(GuzzleHttpPsr7Request), Object(GuzzleHttpPsr7Response))
#1 /home/..../vendor/guzzlehttp/promises/src/Promise.php(204): GuzzleHttpMiddleware::GuzzleHttp{closure}(Object(GuzzleHttpPsr7Response))
#2 /home/.../vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttpPromisePromise::callHandler(1, Object(GuzzleHttpPsr7Response), NULL)
file_get_contents()
returns the same error. And when I open the link in browser it works fine
Can anyone help me?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…