Open AndyLindsay opened 6 years ago
Partially addressed with documentation and example code updates in v1.4.88 Update wifi_scan(TCP... docs
Check how common content-length is in headers. If common, then add function to deliver only content.
Hmmm, this actually looks pretty doable...
Got it. Thank you!
On Fri, Jul 6, 2018 at 1:15 PM, Jim Ewald notifications@github.com wrote:
A word of caution regarding character sets as it relates to the content-length header. If the character set is multi-byte, such as UTF-8, the value in the content-length will be under reported.
Details can be found here https://sankhs.com/2016/03/17/content-length-http-headers/ and here https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Length .
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/parallaxinc/Simple-Libraries/issues/173#issuecomment-403135646, or mute the thread https://github.com/notifications/unsubscribe-auth/ALCgd1aX0QWfZB54Sd5Vg6qcxNlAR-aOks5uD8VIgaJpZM4VE0bB .
This should help: int wifi_getNamedValue(char strSource, char strName, char *fmt, ...);
Usage example on line 102 in Dev branch's Temperature from OpenWeatherMap.
float temp = 0;
wifi_getNamedValue(str, "temp", "%f", &temp);
print("temp = %6.2f deg K\r", temp);
If you try to pass a different string, it is not populated with the response.