apigee proxy setup issue - error "Unsupported Encoding \"br\" in browser

Output using curl command

curl https://gmujire-eval-test.apigee.net/firstproxy {“data”:{“id”:2,“first_name”:“Janet”,“last_name”:“Weaver”,“avatar”:“https://s3.amazonaws.com/uifaces/faces/twitter/josephstein/128.jpg”}}

But output on browser (Google chrome)

{“fault”: {“faultstring”: “Unsupported Encoding "br"”,“detail”: {“errorcode”: “protocol.http.UnsupportedEncoding”}}}

Issue fixed after correcting the target URL.

What did you change? I have the exact same problem. But when I hit the target url directly it works fine, but when I go through Apigee it broke

Please cross check the payload format, there could be some special characters

Hi Gurudutt,

I have the same issue but i finded that the Postman use header encoding br, so if you delete that value on the header, the request pass without problem.

Other solution is use a Target Endpoint in your proxy configuracion without https connection.

1 Like

When you mean delete from he header, what do you mean? I am using a similar tool HTTPBot

Hm the payload works fine when I go direct to the target. So I am not sure where or what to check

I mean 2 options:

A policy that if you send a header with encoding br, apigee wil be remove that. You can find more information here → https://docs.apigee.com/api-platform/reference/policies/assign-message-policy

<AssignMessageasync="false"continueOnError="false"enabled="true"name="AM-FixEncoding"><DisplayName>AM-FixEncoding</DisplayName><Properties/><Set><Headers><Headername="Accept-Encoding">gzip,deflate</Header></Headers></Set><IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables><AssignTocreateNew="false"transport="http"type="request"/></AssignMessage>

In the most popular testing apps as Postman, in the header their include a encoding br (AUTO-GENERATED HEADERS. So u can delete them.

. So u can delete them.

Hi thanks. I send the payload to RequestBin and don’t see a br tag. Where in the policy do you put the assignMessage XML?

You put the assignMessage Policy in the preflow of proxy endpoints.

Does this look right? https://markuphero.com/share/4dz7a54MhbmYbuSWgrrF

Create a Policy,

Attach de Policy to the preflow.

1 Like

Thank you, this worked!

Unfortunately the starting cost for Apigee is $100k which is a surprise from when I used it before the google acwuisition. :slight_smile:

I wish I knew how expensive it was before troubling you. Once it worked I got a response of the starting price.

No problem!