Spring-cloud-netflix: how can i add post body in zuul filter?

Created on 6 Mar 2017  路  5Comments  路  Source: spring-cloud/spring-cloud-netflix

my request is

curl -XPOST '127.0.0.1:8080/zuul-example -d 'abc=123'

to zuul gateway

and i want to add some post params (like xxx=666) in zuul's filter

and i want to backend app can get both of param abc=123 and xxx=666

how can i do? thanks

question

Most helpful comment

I think that FormBodyWrapperFilter may be an example to modify request body. Wrapping the request and building a new content data. These should be done in the pre filter.

All 5 comments

You want to add the parameter xxx=666 in a Zuul filter?

He wants to modify the body.

I think that FormBodyWrapperFilter may be an example to modify request body. Wrapping the request and building a new content data. These should be done in the pre filter.

Hi,
@spencergibb has provided many good examples about Zuul filter, I think you can find what you want, please refer to this LINK.

Closing due to age of the question. If you would like us to look at this issue, please comment and we will look at re-opening the issue.

Was this page helpful?
0 / 5 - 0 ratings