8.2.3 HTTP Client – poll request
The reader supports poll requests. The content of the poll request is user-defined on the
Services HTTP Client page. The request can contain both text and predefined variables
→
(chapter 7.5).
Examples of sending a
poll request
to a server resource "/resource" at a frequency of
sending
1 request every 6 seconds
:
•
GET request
using predefined variables
ip=
%eip%
&name=
%mod_name%
&in1=
%in1%
Data
received on the
server
side
:
GET /resource?ip=
192.168.0.176
&name=
Taw
&in1=
1
HTTP/1.1
User-Agent: Ind2
Host: 192.168.0.90
Content-Length: 0
The
server
can send back the data as a
JSON
(
XML
) file:
HTTP/1.1
200 OK
Content-Length: 33
Content-Type:
application/json
{"lcd_text1":" Place an RFID tag"}
•
POST
request
using predefined variables
ip=
%eip%
name=
%mod_name%
in1=
%in1%
Data
received on the
server
side
:
POST / HTTP/1.1
User-Agent: Ind2
Host: 192.168.0.90
Content-Type: application/x-www-form-urlencoded
Content-Length: 33
ip=
192.168.0.176
name=
Taw
in1=
0
The
server
can send back the data as a
JSON
(
XML
) file:
HTTP/1.1 200 OK
Content-Length: 14
Content-Type:
application/xml
<buzz>3</buzz>
User manual RFID IND2
Page
43
of
61
[B01]