| Posted: 02:47am 18 Jan 2024 |
|
|
|
Webmite WEB TCP CLIENT REQUEST is not always saving the last packet.
The following code
WEB OPEN TCP CLIENT "api.openweathermap.org",80 WEB TCP CLIENT REQUEST b$,m%(),10000 PAUSE 200 WEB CLOSE TCP CLIENT PRINT "Length is ";LLEN(m%()) LONGSTRING PRINT m%()
will return a short string if the "pause 200" delay is not used before closing the stream.
It doesn't seem to matter if the reply is 2 or 20 packets long. It doesn't matter if I am retrieving from my local network or across the WWW. The same 200mS delay is needed.
Replies that fit into one packet don't need the delay before closing.
Jim |