Send HTTP POST or PUT request - #HTTPSND. Telit Wireless Solutions LE910
Reklama
Reklama
AT#HTTPQRY=?
Telit LE910 V2 Series AT Commands
80446ST10707A Rev . 0– 2015-11-03
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.
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>,<c ommand>,<resource>,<data_l en>[,<post_param>[,<extra_h eader_line>]]
SELINT 2
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.
Reproduction forbidden without Telit Communications S.p.A. written authorization - All Rights Reserved
Mod. 0808 2011-07 Rev.2
page 421 of 509
Telit LE910 V2 Series AT Commands
80446ST10707A Rev . 0– 2015-11-03
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
<data_len> : Numeric parameter indicating the data length to input in bytes
<post_param> : Numeric/string parameter indicating the HTTP Contenttype 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 sub-types
<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 can not 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)
Reproduction forbidden without Telit Communications S.p.A. written authorization - All Rights Reserved
Mod. 0808 2011-07 Rev.2
page 422 of 509
Preuzimanje
Reklama