ESP8266 Developer Zone The Official ESP8266 Forum 2015-08-02T04:27:18+08:00 https://bbs.espressif.com:443/feed.php?f=61&t=833 2015-08-02T04:27:18+08:00 2015-08-02T04:27:18+08:00 https://bbs.espressif.com:443/viewtopic.php?t=833&p=3000#p3000 <![CDATA[Re: Q: Does the chip support HTTP posting? How do we do that?]]>
POSTing data:

[Non-OS SDK]
Use espconn_sent (struct espconn * espconn, uint8 * psent, uint16 length) to POST data.

The structure espconn (TCP communications) specifies the server's IP and Port.

Psent: Buffer address of the http-encoded data to send

Length: Length of the data to be transmitted.

[OS SDK]
Users can do so by calling the send function of the socket.
For more information refer to: Documentation> Sample Codes> ESP8266 as TCP client.

(espressif - please correct where necessary)

Statistics: Posted by kenn2 — Sun Aug 02, 2015 4:27 am


]]>
2015-07-28T12:44:05+08:00 2015-07-28T12:44:05+08:00 https://bbs.espressif.com:443/viewtopic.php?t=833&p=2886#p2886 <![CDATA[Q: ESP8266 支持 HTTP 协议吗?如何实现?]]> Q: ESP8266 支持 HTTP 协议吗?如何实现?
ESP8266 可以支持 HTTP 协议。
【non-OS SDK】
通过 espconn_sent(struct espconn *espconn, uint8 *psent, uint16 length) 实现
该函数中 espconn 为 TCP 通信的结构体,里面指定服务器的 IP 和 Port。
  • Psent:为发送数据的 Buffer 地址,用户需要将要发送的 Http 数据放到该psent 指向的 Buffer 中。
  • Length:要发送的数据的长度。
【OS SDK】
调用 socket 的 send 函数可以实现。
更多资料参考:Documentation > Sample Codes > ESP8266 as TCP client

Statistics: Posted by Guest — Tue Jul 28, 2015 12:44 pm


]]>