Contents

Roo

HTTP.get()

Makes a simple HTTP GET request to the specified URL. This is a convenience method to avoid having to construct a Request object manually. If your request needs to specify particular headers or cookies then constructing a Request object will be required.

HTTP.get(url as Text, optional timeout as Integer) as Response

Parameters

  • url: Text object. The URL to make the GET request to
  • timeout: Optional integer Number object. The number of seconds to wait before assuming that the request timed out. If not specified then a value of 10 seconds is used

Returns

Example

var response = HTTP.get("https://garrypettet.com")
response.status # 200