简体   繁体   中英

dynamic http response based on http request in java

We are building small test simulators that need to respond to restful requests injected into a platform based on content we inject into the message:

Example:  GET http://server/example-app/users
Content-Headers and/or query params = some value of pass with 200
Server respond with 200 and content


Example:  GET http://server/example-app/users
Content-Headers and/or query params = some value of fail with 400
Server respond with 400 and error

I am looking to see if anyone knows of an open source tool that would be of usefulness to inspect / parse the http request and figure out response based on the look-up criteria. I'm sure I could write some parsers easily, but just interested if the community has used or knows of something that is available to do the parsing and response mappings.

OWASP Zed Attack Proxy可能满足您的需求。

Fiddler是检查代码和执行过滤的出色代理: http : //fiddler2.com/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM