HTTP server
- Last UpdatedFeb 14, 2023
- 1 minute read
The interface measures HTTP server response times for points with Location2 set to 3. TCPResponse connects to the HTTP port of a specified machine (for example, DEVICE=www.somecompany.com in the InstrumentTag). The HTTP port is either the default port (80) or a user-specified port by PORT= in the InstrumentTag. After establishing the connection, the interface sends the following message to the HTTP server:
HEAD / HTTP/1.1\r\n
Host: www.somecompany.com\r\n
Note: \r is the ASCII character whose decimal code is 13 (carriage return) and \n is the ASCII character whose decimal code is 10 (newline).
TCPResponse then waits for the HTTP server to send a message that contains the case-sensitive ASCII text HTTP/1.1. In other words, TCPResponse performs a case-sensitive substring search for HTTP/1.1 in the received reply.
You can tell the interface to perform a substring search for another text string by specifying the case-sensitive string by REPLY= in the InstrumentTag. The keyword REPLY itself is not case-sensitive.
The response time measured by the interface is the amount of time from the time of the connection request to the time when the interface receives a response message containing HTTP/1.1. If the interface does not receive a message containing HTTP/1.1, it writes the value Bad Input. If the interface does not receive a reply within a user-specified timeout duration, it writes I/O Timeout.