Hello,
I'm working with a Pyramid FX4 Device. I'd like to use HTTP requests to communicate using StreamDevice. I'm having success using GETs, however I'm running into issues with the PUTs.
The programmer manual states to do the following:
PUT /io/net/hostname.json HTTP/1.1
"New-Hostname"
Below I've listed my configuration as well as examples for the GET and PUT requests for getting and setting the hostname.
Any help to properly form the HTTP PUT request would be greatly appreciated.
Thanks,
Kyle
Configuration:
drvAsynIPPortConfigure("fx4", "129.57.203.137:80 HTTP", 0, 0, 0)
OutTerminator = CR LF CR LF;
PUT Request Example (Unsuccessful):
set_host{
out 'PUT /io/net/hostname/value.json HTTP/1.1 "New-Hostname"';
}
Get Request (Successful):
hostname {
out "GET /io/net/hostname/value.json HTTP/1.1";
in "%*182c%[_a-zA-Z0-9]%*2c";
|