安信可 http_client_socket示例 ====== .. raw:: html Http client socket Example -------------- Configure WiFi Connected ::::::::: Please configure the ssid and password that need to be connected to WiFi in advance,in `main.c`. .. code-block:: c #define ROUTER_SSID "your ssid" #define ROUTER_PWD "your password" Compile and download ::::::::: Compile command ::::::::: make -j16 `-j16`is the number of cores in the system. download ::::::::: make flash p=/dev/ttyUSBx b=921600 `/dev/ttyUSBx`is the port number of the Ai-WB2 connection, usually ttyUSB0 Example Output ::::::::: successfully request web url ::::::::: :: [32mINFO[0m (11611)[demo.c: 68] ... connected [32mINFO[0m (11614)[demo.c: 78] ... socket send success [32mINFO[0m (11618)[demo.c: 91] ... set socket receiving timeout success HTTP/1.0 200 OK Age: 316063 Cache-Control: max-age=604800 Content-Type: text/html; charset=UTF-8 Date: Fri, 21 Oct 2022 07:50:25 GMT Etag: "3147526947+ident" Expires: Fri, 28 Oct 2022 07:50:25 GMT Last-Modified: Thu, 17 Oct 2019 07:18:26 GMT Server: ECS (sab/56CE) Vary: Accept-Encoding X-Cache: HIT Content-Length: 1256 Connection: close
This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.