Skip to main content

Set Value of a Process Dictionary Entry

  • Description

    POST /proc_put HTTP/1.1

    {"key":"[key]","value":"[value]"}
  • Possible Responses

    {"code":0,"message":"Success","key":"[key]","old_value":"[old value]","value":"[new value]"}
    {"code":1,"message":"Operation failed"}
  • Notes

    • Store an entry with key [key] and value [value] in the running XXTouch service process dictionary on the device
    • [key] is used to retrieve the value
    • [value] is a string
  • Example

    For example, send this request to the device:

    POST /proc_put HTTP/1.1
    Content-Length: 45

    {"key":"greeting","value":"Hello World"}

    If the device script contains:

    sys.alert(proc_get("greeting"))

    The device displays an alert:

    Hello World