HTTP.Get
Core library HTTP GET — returns status and response body as an object. Requires Platform.Load.
HTTP.Get performs a GET request and returns a single object with numeric status information and the response payload (see official SOAP/Core HTTP documentation for the exact shape in your stack).
Requires Platform.Load("core", "1.1.5") before use.
Syntax
var response = HTTP.Get(url[, headerNames, headerValues]);
When you omit headerNames and headerValues, pass nothing after url. When you include them, both arrays must have the same length and parallel ordering.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url |
string | Yes | Destination URL |
headerNames |
string[] | No | Header names to send |
headerValues |
string[] | No | Values paired with headerNames |
Return value
Returns an object (not a bare string). Official samples describe fields such as numeric status and string Content holding the body—inspect Stringify(response) when integrating a new endpoint.
Example
Platform.Load("core", "1.1.5");
var response = HTTP.Get("https://api.example.com/data");
Write(Stringify(response));
var parsed = Platform.Function.ParseJSON(String(response.Content));
To inspect HTTP status codes with full control, prefer Script.Util.HttpRequest.