string.httpResultSplit

Syntax string.httpResultSplit (s, adrHeaderTable=nil)

Params s is a string containing the full text received in response to an HTTP request.

adrHeaderTable is an address, it points to a table that's to receive the parsed header information from the request. It's an optional parameter.

Action Splits the text of the input string into two parts, the header, which it parses if adrHeaderTable is not nil, and the body, which is the returned value.

Returns The body portion of the HTTP result.

Examples
scratchpad.s = tcp.httpClient ("GET", "www.scripting.com", 80, "/")

sizeOf (string.httpResultSplit (scratchpad.s, @scratchpad.headers))

   » 22509


scratchpad.headers.["Content-length"]

   » "22509"

Notes This verb is implemented as a script.

See Also tcp.httpClient

string.urlSplit

Discuss