Version: v0.7.0 - Beta.  We welcome contributors & feedback.


Net.httpGet($url, $headers={}) -> string|map


Send an HTTP GET request and get the response.

$url must be a URL TypeString.

$headers is an optional map of HTTP request headers.

If the response body is JSON, it will be returned as a Map. Otherwise, it will be returned as a string.

// Basic call
$content = Net.httpGet(url'')

// With headers
$headers = {
    'Cookie': 'sessionId=1234'
$content = Net.httpGet(url'', $headers)