Kong / unirest-java

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

Example mistake fixed #310

Closed nuwan94 closed 4 years ago

nuwan94 commented 4 years ago

Requests example is not working because the types are mismatching. Corrected it by changing return type to JSON.

HttpResponse<JsonNode> response = Unirest.post("http://httpbin.org/post")
      .queryString("apiKey", "123")
      .field("parameter", "value")
      .field("foo", "bar")
      .asJson();
ryber commented 4 years ago

Thanks @nuwan94 !