SensusRF gateway user manual
| 29/10/2019
18 APPENDIX B: GATEWAY HTTP/HTTPS SERVER REQUIREMENTS
Gateway files can be delivered over Hyper Text Transfer Protocol (HTTP) / Hypertext Transfer Protocol Secure
(HTTPS).
All files are be sent in a single POST request, as ilustrated below:
The following fields will be sent in the header structure:
1. POST /serverURL; HTTP/1.1
A request message from a client to a server includes, within the first line of that message, the method to
be applied to the resource, the identifier of the resource, and the protocol version in use.
2. Content-Type: multipart/form-data; boundary=16bc3dfb501
The Content-Type entity-header field indicates the media type of the entity-body sent to the recipient.
For multipart entities the boundary directive is required, which consists of 1 to 70 characters from a set
of characters and not ending with white space. It is used to encapsulate the boundaries of the multiple
parts of the message.
3. Authorization: Basic c2Vuc3VzOnBhc3N3ZHRlc3Q=
A user agent that wishes to authenticate itself with a server does so by including an Authorization
request-header field with the request. The Authorization field value consists of credentials containing
the authentication information of the user agent for the realm of the resource being requested.
The following fields will be sent in the body structure:
1. Content-Disposition: form-data; name=“file"; filename=“filename1.zip“
In a multipart / form-data body, the HTTP Content-Disposition general header is a header that can be
used on the subpart of a multipart body to give information about the field it applies to. It defines the
file sequence and the filename.
2. Content-Type: application/zip
The Content-Type entity used to indicate the media type of the resource.
3. Content-Transfer-Encoding: binary
The transfer encoding method is stored in the Content-Transfer-Encoding header field of the message.