https://github.com/lindar-open/well-rested-client
A very well RESTed client
https://github.com/lindar-open/well-rested-client
http http-client java java-8
Last synced: over 1 year ago
JSON representation
A very well RESTed client
- Host: GitHub
- URL: https://github.com/lindar-open/well-rested-client
- Owner: lindar-open
- License: apache-2.0
- Created: 2017-03-15T12:14:09.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-09-08T12:24:12.000Z (over 2 years ago)
- Last Synced: 2025-01-09T08:15:47.200Z (over 1 year ago)
- Topics: http, http-client, java, java-8
- Language: Java
- Homepage:
- Size: 260 KB
- Stars: 0
- Watchers: 8
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# well-rested-client
Want a nice rest client that just works without too much headache?
Try this well rested and ready to go client built on top of apache http client
Check out the [Releases](https://github.com/lindar-open/well-rested-client/releases) page for detailed info about each release.
Examples:
**GET Request:**
``` java
ResponseVO serverResponse = WellRestedRequest.builder().url(url).build().get().submit();
```
The ResponseVO class contains the status code returned by the server and the server response returned as String.
**POST Request:**
**How to post a json string directly:**
``` java
ResponseVO serverResponse = WellRestedRequest.builder().url(url).build().post().jsonContent(jsonString).submit();
```
**How to post an object as json:**
``` java
ResponseVO serverResponse = WellRestedRequest.builder().url(url).build().post().jsonContent(myObj).submit();
```
**How to post an xml string directly:**
``` java
ResponseVO serverResponse = WellRestedRequest.builder().url(url).build().post().xmlContent(xmlString).submit();
```
More examples to come...
Usage:
```xml
com.lindar
well-rested-client
1.4.1
```