http.get(string, table)

Availability:

agent

Returns:

HTTP request

Parameters:

parameter type description
1 string URL
2 table Optional table of additional HTTP headers

Description

This method returns an httprequest object primed to perform an HTTP/1.1 GET request to the given URL. The request isn't started until sendsync() or sendasync() is called on the returned object.

The URL must start with "http:" or "https:" - ie. it must include the colon.

The headers can be any supported by HTTP, for instance:

{ "Content-Type" : "text/xml" }

Note that headers are specified without the colon.

Example