Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
W wiki
  • Project overview
    • Project overview
    • Details
    • Activity
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
Collapse sidebar
  • pub
  • wiki
  • Wiki
  • avl_rest_json_howto

avl_rest_json_howto · Changes

Page history
sugar created page: avl_rest_json_howto authored Nov 15, 2017 by Guido Voigt's avatar Guido Voigt
Hide whitespace changes
Inline Side-by-side
Showing with 49 additions and 0 deletions
+49 -0
  • avl_rest_json_howto.md avl_rest_json_howto.md +49 -0
  • No files found.
avl_rest_json_howto.md 0 → 100644
View page @ b4569edc
# HowTo use REST/JSON
## 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
```
## REST specific PFAL commands
* command to sent HTTP REST with URL encodiong
TCP.Send.Rest,"<URL>",<enableBodyEncryption>,"<Parameter-String>"
+ <URL>: http:// must be included!; optional :<port_number> is possible
+ <enableBodyEncryption>: 0 - no encryption is used
+ <Parameter-String>: url-encoded key1=val1&key2=val2&..&key<n>=val<n>
* command to sent HTTP REST with JSON body
```
TCP.Send.JSON,"<URL>",<enableBodyEncryption>,"<Parameter-String>"
```
+ <URL>: http:// must be included!; optional :<port_number> is possible
+ <enableBodyEncryption>: 0 - no encryption is used
+ <Parameter-String>: 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 <d4fb>
* flush command for Multi parameter JSON
```
TCP.JSON.Flush,"<URL>",<enableBodyEncryption>,"<Parameter-String>"
```
send unsent data as MultiMsg JSON
<Parameter-String> : JSON with additional marker as placeholder
for stored single data lines {<optional additional JSON>,<d4fb>}
Clone repository
  • AVL Filesystem
  • BOLERO40_GNSS_improvement
  • BOLERO40_improvement_of_the_GNSS_performance
  • NFC_commands,_event,_dynamic_variable
  • Promotion_Kit_Settings
  • Workbench Mac Installation Readme
  • avl_aes_key_handling
  • avl_ble
  • avl_blueid
  • avl_config_commented_1
  • avl_ecodrive
  • avl_feature_list
  • avl_frp_main
  • avl_fw_update
  • avl_premium_feature_cpc
View All Pages