Panasonic AW-HE40 HTTP Control

I’m attempting to control the Panasonic Camera with the following code:

ogscript.asyncHTTP(“http://192.168.106.120/cgi-bin/camctrl?preset=0”, “GET”, “text/plain”, “”, null);

When I press the button debugger is showing me this:

17:33:49:386: Server returned HTTP response code: 400 for URL: http://192.168.106.120/cgi-bin/camctrl?preset=0

When i send the same get request in Postman it works everytime.

I don’t have a lot of experience with asyncHTTP. Try using null as the data instead of “” (and also perhaps use a null instead of “text/plain”)

#DashBoard

I would also null-out the data field for an HTTP GET request. Right now you are putting an empty string there. Non-null content attempts to open an input stream to send data to the server and your server may not support this.

#DashBoard