Kong / unirest-java

Unirest in Java: Simplified, lightweight HTTP client library.
http://kong.github.io/unirest-java/
MIT License
2.58k stars 591 forks source link

Can unirest-mock capture request body #444

Closed yhjhoo closed 1 year ago

yhjhoo commented 2 years ago

Can unirest-mock capture request body?

ryber commented 2 years ago

unrest-mock primarily has a expectation on a body, so it doesn't capture it so much as takes a look and sees if it matches it's expectation. The problem with capturing it entirely is that the formatting of the body is something that is going to be done at a lower level that where the mock sits. Apache Http Client (or Java in the case of Unirest-4) will do a lot of the formatting, especially for multi-part bodies

ryber commented 1 year ago

this is complete in 3.14.0 / 4.0.0-RC6