@tim Thank you very much for your feedback!
I can confirm everything work with the corrected template.
@tim Thank you very much for your feedback!
I can confirm everything work with the corrected template.
While testing the product QUERX TH we tried to configure the "http-push" to move the informations from the field to our IoT cloud in our development environment.
During R&D, we:
• upgraded the QUERX firmware to latest version 4.4.18.1
• followed the instructions to build our own template to be able to add a dynamic access token
• uploaded it on the product
• successfully tested the POST to our web service
The custom template is pretty simple:
add=/tpl/j/cloud.tpl
Authorization: Bearer {{pushtab_var1}}
Content-Type: application/json; charset=utf-8
{ # # }
{"{{sensortab_name.0}}": {"value": "{{sensortab_value.0}}", "unit":"{{sensortab_unit.0}}"}, "{{sensortab_name.1}}": {"value": "{{sensortab_value.1}}", "unit":"{{sensortab_unit.1}}"}}
The issue we faced is that the posted content, whenever we are using a custom template, has an http header which is not following the web standards.
As you can see in the following screenshot the “Content-Length” header of the POST request is always set to the value: -2
Problem is “-2” is not a standard value for that specific header (which should be >= 0) and we should break the standards to allow the web server to accept such information.
We tried:
but without success.
Are we doing something wrong ?
Is this a bug ?
Any hint is much appreciated, thanks for your support!