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

Documentation is misleading for HttpRequestWithBody.body #421

Closed derklaro closed 2 years ago

derklaro commented 2 years ago

Version: 4.0.0-RC1

Just as the title describes i guess.. The JavaDoc states: @return this request builder which leads to the expectation that the method returns the current request instance. The implementation however (return new HttpRequestUniBody(this).body(body);) returns a new instance, leading to the fact that the given body is not present.

ryber commented 2 years ago

for which method?

derklaro commented 2 years ago

All of the body methods in HttpRequestWithBody

derklaro commented 2 years ago

Sorry, missed your commit. Thanks!