请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:CC3235S 在 HttpClient_sendRequest ()函数标题中有以下描述:
/*!
\brief Make an HTTP request to the HTTP server
Sends an HTTP request-line, header fields and body to the requested URI.
After sending the request, the request function waits for the response Status
and Header-Fields.
According to the response status, the request function determines whether to
return to user or to call a redirect/callback pre-defined function.
\param[in] client Instance of an HTTP client.
\param[in] method HTTP method.
\param[in] requestURI The path on the server to open.
\param[in] body The body the user wishes to send in in the request,
The body can be chunked or one body buffer.
\param[in] bodyLen Length of the body sent in the request.
\param[in] flags Special flags when the user wishes not to use the
default settings.
- #HTTPClient_CHUNK_START - First request body chunk.
- #HTTPClient_CHUNK_END - Last request body chunk.
- #HTTPClient_DROP_BODY - only keep the status code
and response headers, the response body will be
dropped.
\note - If user wishes to use TLS connection then before calling
HTTPClient_sendRequest(), HTTPClient_connect() should be
called.
- If disconnection happened prior to HTTPClient_sendRequest(),
HTTPClient_sendRequest() will reconnect internally.
- When sending a body in a request, the "Content-length: " and
"Transfer-Encoding: Chunked" headers will be added
automatically.
\return Response status code on success or error code on failure.
*/
int16_t HTTPClient_sendRequest(HTTPClient_Handle client, const char *method,const char *requestURI, const char *body, uint32_t bodyLen, uint32_t flags);
-如果断开连接发生在 HttpClient_sendRequest ()之前,
HttpClient_sendRequest()将在内部重新连接。
关于上面红色部分中的内容、
如果您 在调用 HttpClient_sendRequest ()之前关闭 Wi-Fi 热点,然后 在20秒后打开 Wi-Fi 热点, 重新连接是否会 继续?
重新连接需要多长时间?
在什么情况下,HttpClient_sendRequest()将退出执行。