HowTo use REST/JSON
REST specific PFAL commands
- 
command to sent HTTP REST with URL encodiong TCP.Send.Rest,"",,""
- : http:// must be included!; optional :<port_number> is possible
 - : 0 - no encryption is used
 - : url-encoded key1=val1&key2=val2&..&key=val
 
 - 
command to sent HTTP REST with JSON body
 
TCP.Send.JSON,"<URL>",<enableBodyEncryption>,"<Parameter-String>"
- : http:// must be included!; optional :<port_number> is possible
 - : 0 - no encryption is used
 - : have to start with { and end with } key names have to enclosed by escaped character ' between key and value the character : is required values: strings have to enclosed by escaped character ' fractional numbers with . as separator
 
- 
new dynamic entry &(HttpResponse) - reports the last responded HTTP status message/error code
 - 
write command for Multi parameter JSON
 
TCP.JSON.Write,"<Parameter-String>"
write single data line to flash buffer for unsent msg, each with leading marker
- flush command for Multi parameter JSON
 
TCP.JSON.Flush,"<URL>",<enableBodyEncryption>,"<Parameter-String>"
send unsent data as MultiMsg JSON : JSON with additional marker as placeholder for stored single data lines {,}
EXAMPLE
simple send position data
PFAL command example
TCP.JSON.Flush,"http://testserver.com/json",0,":{\'LAT\':&(LastLat),\'LON\':&(LastLon),\'IMEI\':&(IMEI),\'IGN\':&(IO8)}"
HTTP POST
TBD