Plain Text Response Not Recognized into Response


#1

I am making a Get request to an endpoint controlling a string of LEDs. To find out the brightness, the endpoint responds with the current brightness value in plain text like “20” for 20%. I cannot for the life of me figure out how to get that to be recognized by my piston. I’ve tried using the $response variable, that just get set to “null” for some reason. There’s no real argument to use in this case. I’m totally stuck. Any help?


#2

I would start by logging the entire response immediately after the GET request, like this:

temp

Then save, test the piston, and share your log with us so we can see what you are working with


#3

My guess, like I mentioned yesterday, is you are getting more than one $response… the last response is probably blank which is what is saved in your variable.


#4

It’s definitely only getting one response. When I send the GET from postman I can see it returns one message and it’s formated as text not JSON. I will try the Log info and post the result.


#5

Well, the Log info worked…this time. I KNOW that I tried that before. Maybe I was missing the $ or something. I dunno. Important thing now is it’s working. Thank you all!!!


#6

Although, webcore is still loggibg two responses even though there is one.