Apito REST API Integration with Java
Unirest is a lightweight HTTP client library from Mashape. Along with Java, it's also available for Node.js, .Net, Python, Ruby, etc.
Using Unirest
Library​
note
Always remember to replace API_SECRET
of the Bearer Token and project-id
of the URL with the correct value from apito console.
Go to this page if you do not know where to find your api secrets and endpoints for your project
client.java
HttpResponse<String> response = Unirest.get("https://api.apito.io/secured/rest/project-id")
.header("content-type", "application/json")
.header("authorization", "Bearer API_SECRET")
.asString();