The address can be a symbolic hostname and the port can be a symbolic service name. The address can also be specified as *, which means to accept connections from any IPv4 address. The syntax with the square brackets is intended to use with numeric IPv6 addresses, to resolve the ambiguity between colons inside the address and the colon separating the address from the port.
|/3270/||Directory||Root of all emulator objects|
|/3270/rest/||Directory||Root of REST APIs|
|/3270/rest/text/||REST object||REST HTML API|
|/3270/rest/stext/||REST object||REST plain text API with status line|
|/3270/rest/html/||REST object||REST HTML API|
|/3270/screen.html||Document||Current screen snapshot|
/3270/rest/text/Enter%28%29Note that %28 is the ( character and %29 is the ) character, so this request is decoded as Enter().
In the REST parameter, special URL characters such as (, ), ?, &, #, /, % and spaces must be percent-encoded. (A good rule of thumb is to percent-encode any character besides upper- and lower-case letters and the digits 0-9.)
Character codes above 0xfe need to be percent-encoded in UTF-8. For example, the character á (U+00E1) would be encoded as %C3%A1.
Failed requests result in bad HTTP status, usually 400 for an invalid request and 500 for an internal error. The body of the response, in HTML, includes descriptive text for the error.
/3270/rest/text/Query%28CodePage%29might return the following in a text/plain response:
37+followed by CR and LF characters.
/3270/rest/stext/Query%28CodePage%29might return the following in a text/plain response:
L U U N N 4 24 80 0 0 0x3800040 - 37+CR and LF characters terminate each line.
The title and H1 heading indicate the success of the request.
There are two H2 sections. The first is the status line, and the second is the response text. The contents of each section is a <PRE> block containing the literal text. If the response is empty, the corresponding section has the italic string (empty) instead.
At the bottom is a horizontal rule and the x3270 version string.