Http.get variable

Posting data no problem having trouble pulling a value into my spark core. I want to get the LAST value of a variable.

I am trying to get the value and POST it immediately just to see what it does. Code which does not work looks like so.

   request.path = "/api/v1.6/variables/544cf88c7625427a57e5a81c/"; 
   request.body = "{\"last_value\":\"value\"}";
   http.get(request,response,headers);
   
   String test = response.body;
   
   request.path = "/api/v1.6/variables/"VARIABLE_ID3"/values";
   request.body = "{\"value\":" + String(test) + "}";
   http.post(request, response, headers);

All the code works but not the GET portion. I am sure its a lack of knowledge on my part.

Hi all,

We solved this question is this thread: