How can connect a java application to the BOLT cloud???
I want to create a face recognition attendance system using java and but i want to link it to the bolt cloud.
@bcapp40 The Bolt APIs are language independent as the APIs use HTTP calls.
You can use a suitable Java library to make the calls. The response is in JSON.
Check out the link for the documentation below,
1 Like
THANK YOU SHOEB.
I want to creat a Java Application and want to interface it with Bolt cloud to prepare a database of a particular entry system and then to fetch that data from the cloud.
Hi @bcapp40,
Each programming language has packages to do https request. Java has lot packages for doing the http request Foe example :
- OkHttpClient - https://www.vogella.com/tutorials/JavaLibrary-OkHttp/article.html
- Apache http client - https://howtodoinjava.com/library/jaxrs-client-httpclient-get-post/
Check the code below for sending the Digital Write command using Ok Http client of java.
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://cloud.boltiot.com/remote/v2/e89c2a19-2317-4ed4-9a39-711db5f05ae8/digitalWrite?pin=2&state=LOW&deviceName=BOLT7488206")
.get()
.addHeader("cache-control", "no-cache")
.build();
Response response = client.newCall(request).execute();
Do let me know in case you need further assistance.
1 Like