This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

openDTU - JSON - http post - "no values found"
#3
This is something which I already tried. In this case I get the following log:

Code:
* arg: 1
  * string: {"type":"warning","message":"No values found!","code":1002}
* arg: 2
  * number: 200
* arg: 3
  * table:
   ["content-length"]
    * string: 59
   ["accept-ranges"]
    * string: none
   ["content-type"]
    * string: application/json
   ["connection"]
    * string: close
* arg: 4
  * string: HTTP/1.1 200 OK

I log "body" as well and get the following result:

 
Code:
* string: {"limit_value":"10","limit_type":"1","serial":"000000000000"}

I don't understand why the serial is still in the thrid position. I changed the code and expect the serial to be on first position. Why does this not happen?
Code:
body = json.encode({   
   serial = '000000000000',
    limit_type = '1',   
    limit_value = '10',
})


For a common understandig - although it's not shown hier in the code, I use the correct serial and IP.
Reply


Messages In This Thread
RE: openDTU - JSON - http post - "no values found" - by cgn - 10.06.2024, 14:51

Forum Jump: