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"}}}

Solved Solved
0 14 3,284
1 ACCEPTED SOLUTION

Issue fixed after correcting the target URL.

View solution in original post

14 REPLIES 14

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

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

red13
New Member

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.

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

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.

10682-captura-de-pantalla-2020-12-28-a-las-181731.png

. 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.


Create a Policy,

10689-captura-de-pantalla-2020-12-29-a-las-171542.png


Attach de Policy to the preflow.

10690-captura-de-pantalla-2020-12-29-a-las-171631.png

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. 🙂

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

No problem!