Spring-cloud-gateway: Anybody can help me to get response body in global filter?

Created on 30 Jan 2019  路  10Comments  路  Source: spring-cloud/spring-cloud-gateway

This is not the same question which how to get request body,
I tried my best but failed,
I have to give up the spring cloud gateway and replace it with kong.

question

Most helpful comment

@weichaojie
Could you give an example how you get response body with GZIP?

All 10 comments

image

the real body data is a json string.

In the same directory is a similar filter to modify the response.

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

I have to use kong to instead of spring cloud gateway...

In the same directory is a similar filter to modify the response.
image

I tried the method you recommended.
The data obtained is not what I expected.
I don't know where I got it wrong?

we found a solution.
Use GZIPInputStream to decode the stream.

@weichaojie
Could you give an example how you get response body with GZIP?

Can you please post the solution?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xfworld picture xfworld  路  3Comments

maoyunfei picture maoyunfei  路  3Comments

ShahzebAnsari picture ShahzebAnsari  路  3Comments

ryanjbaxter picture ryanjbaxter  路  6Comments

vborcea picture vborcea  路  6Comments