HTTP.Get is a simple HTTP GET method from the Core library.

Syntax

var body = HTTP.Get(url);

Parameters

Name Type Required Description
url string Yes Target URL

Return Value

Returns the response body as a string.

Examples

Platform.Load("core", "1.1.5");

var body = HTTP.Get("https://api.example.com/products");
var products = Platform.Function.ParseJSON(body + "");
for (var i = 0; i < products.length; i++) {
    Write(products[i].name + "<br>");
}

Notes

HTTP.Get does not expose the HTTP status code. Use HTTP.GetRequest if you need to inspect the response status.

See Also