Send HTTP POST or PUT request - #HTTPSND. Multitech MTSMC-LSP3 , MTSMC-LSP3-U, MTSMC-LSP3-SP, MTSMC-LSP3-U-SP, MTCAP-LSP3-915-041A, MTCM-LSP3-B03-KIT
Publicitate
Publicitate
#HTTPQRY – send HTTP GET, HEAD or DELETE request
<content_type>
is a string reporting the “Content-Type” header line, as received from the server (see RFC 2616).
<data_size>
is the byte amount of data received from the server. If the server doesn’t report the "Content-Length:" header line, the parameter value is 0.
Note:
if there are no data from server or the server doesn’t answer within the time interval specified in <timeout> parameter of #HTTPCFG command, then the URC
#HTTPRING <http_status_code> parameter has value 0.
AT#HTTPQRY=?
AT Commands Reference Guide
8s0490ST10778A Rev.4– 2018-04-12
Test command reports the supported range of values for the parameters <prof_id> and <command> and the maximum length of <resource> parameter in the format:
#HTTPQRY: (list of supported <prof_id>s),(list of supported
<command>s),<r_length>,<m_length>
where:
<r_length>
- integer type value indicating the maximum length of parameter
<resource>.
<m_length>
- integer type value indicating the maximum length of parameter
<extra_header_line>.
Send HTTP POST or PUT request - #HTTPSND
#HTTPSND – send HTTP POST or PUT request
AT#HTTPSND=
<prof_id>,<command
>,<resource>,<data_le n>[,<post_param>[,<e xtra_header_line>]]
Execution command performs a POST or PUT request to HTTP server and starts sending data to the server.
The device shall prompt a three character sequence
<greater_than><greater_than><greater_than>
(IRA 62, 62, 62)after command line is terminated with <CR>; after that the data can be entered from TE, sized <data_len> bytes.
Parameters:
<prof_id>
- Numeric parameter indicating the profile identifier.
Range: 0-2
<command>
- Numeric parameter indicating the command requested to HTTP server:
0 – POST
1 – PUT
<resource>
- String parameter indicating the HTTP resource (uri), object of the request
Reproduction forbidden without Telit Communications S.p.A. written authorization - All Rights Reserved page 409 of 491
#HTTPSND – send HTTP POST or PUT request
<data_len>
- Numeric parameter indicating the data length to input in bytes
<post_param>
- Numeric/string parameter indicating the HTTP Content-type identifier, used only for POST command, optionally followed by colon character (:) and a string that extends with sub-types the identifier:
“0[:extension]”
– “application/x-www-form-urlencoded” with optional extension
“1[:extension]”
– “text/plain” with optional extension
“2[:extension]”
– “application/octet-stream” with optional extension
“3[:extension]”
– “multipart/form-data” with optional extension other content – free string corresponding to other content type and possible subtypes
<extra_header_line>
- String parameter indicating optional HTTP header line
If sending ends successfully, the response is OK; otherwise an error code is reported.
Note:
the HTTP request header sent with #HTTPSND always contains the
“Connection: close” line, and it cannot be removed.
When the HTTP server answer is received, then the following URC is put on the serial port:
#HTTPRING:
<prof_id>,<http_status_code>,<content_type>,<data_size>
Where:
<prof_id>
is defined as above
<http_status_code>
is the numeric status code, as received from the server
(see RFC 2616)
<content_type>
is a string reporting the “Content-Type” header line, as received from the server (see RFC 2616)
<data_size>
is the byte amount of data received from the server. If the server doesn’t report the "Content-Length:" header line, the parameter value is 0.
Note:
if there are no data from server or the server doesn’t answer within the time interval specified in <timeout> parameter of #HTTPCFG command, then the URC
#HTTPRING <http_status_code> parameter has value 0.
AT#HTTPSND=?
AT Commands Reference Guide
8s0490ST10778A Rev.4– 2018-04-12
Test command returns the supported range of parameters <prof_id>, <command> and <data_len> and the maximum length of <resource>, <post_param> and
<extra_header_line> parameters in the format:
# HTTPSND: (list of supported <prof_id>s),(list of supported <command>s),
<r_length>, (list of supported <data_len>s),<p_length>,<m_length>
where:
Reproduction forbidden without Telit Communications S.p.A. written authorization - All Rights Reserved page 410 of 491
Descarcă
Publicitate