Closed Qahraman closed 9 years ago
We often use the Apache HttpClient v. 4.x, but any decent Java HTTP or REST client library will work.
RESTHeart's integration tests suite is a good starting point for examples:
https://github.com/SoftInstigate/restheart/tree/develop/src/test/java/org/restheart/test/integration
There we use the org.apache.http.client.fluent.Executor
Specifically, have a look at the following class: https://github.com/SoftInstigate/restheart/blob/develop/src/test/java/org/restheart/test/integration/PutDocumentIT.java
Note: in RESTHeart's semantic model you must PUT a document to a collection, not POST.
PS. Python client sample code is available as well: https://github.com/SoftInstigate/restheart-python-test
Thanks for all.
how can i send post request with using java http request? I want insert any value in my collection.have any example for this?