How do you translate curl -d "65" to a java httpput entry? I need to do the curl commands here in this link to java using java apache http library.
Acquiring and changing basic data on the Nest thermostat
Here is the curl command:
curl -v -L -X PUT "https://developer-api.nest.com/devices/thermostats/THERMOSTAT_ID/target_temperature_f?auth=AUTH_CODE" -H "Content-Type: application/json" -d "65"
here is my java code :
httpPut.setHeader("Content-Type", "application/json");
HttpEntity put_entity = new StringEntity("65"); // Problem is here, I think!
httpPut.setEntity(put_entity); // or here!
HttpResponse put_response = httpclient.execute(httpPut);