HTTP

scop.http.crackrequest(headers)

Returns the main components of the headers of a HTTP request as a table
returns: table
data - Request/POST data (if any)
method' - Request method (GET, POST, HEAD, etc...)
path - URL path

scop.http.getheader(headers,fieldname)

Gets the value of a header field
returns: string

headers = [[HTTP/1.1 200 OK
Date: Mon, 23 May 2005 22:38:34 GMT
Server: Apache/1.3.3.7 (Unix) (Red-Hat/Linux)]]
server = scop.http.getfield(headers,'Server')
print(server)
-- This will print: Apache/1.3.3.7 (Unix) (Red-Hat/Linux)