Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

rezuankassim's avatar

Laravel Http Client cURL 61 unrecognised encoding

Hi guys,

Im calling an api from AppStoreConnect from Apple which is https://api.appstoreconnect.apple.com/v1/salesReports and in their documentation it is stated that the 200 response will return Content-Type: gzip

When I call the API using Laravel Http Client with headers

[
  'Accept' => 'application/a-gzip',
  'Accept-Encoding' => 'gzip, deflate, br'
]

I am getting cURL 61: unrecognised content encoding type.

The solution I am using is to put options 'decode_content' => false using withOptions and then gzdecode the response.

Is there anyway to let the Laravel Http Client to decode the response automatically without gzdecode it using PHP?

0 likes
2 replies
fn365's avatar

Did you ever solve this in a better way?

AhmedHelmy's avatar

@fn365 hello dear i'm still stuck in this error

The provided Accept header is not supported for this request.

Requested: application/json

Allowed: application/a-gzip

My headers 'Accept-Encoding' => 'gzip, deflate, br', 'decode_content' => false

so could you please send me a snap shot form working code with this sales report endpoint

Please or to participate in this conversation.