Get

Overview

Performs an HTTP GET using the provided name and value pairs against the passed URL and returns a JSON object containing a status value and the HTTP response. You can include multiple pairs of header names and values.

Syntax

Get(1, 2, 3)

Function Properties

OrdinalTypeDescription
1stringRequiredDestination URL for the HTTP GET request
2arrayArray of header names to include in the request
3arrayArray of header values corresponding to the header names included in the request

Marketing Cloud recognizes any character set returned in the HTTP headers via Content-Type. For example, you can use a UTF-8 encoded HTML file with Content-Type: text/html; charset=utf-8 included in the header. If the encoding is not specified in the header, the application assumes all returned data will be in the character set WindowsCodePage 1252. You can change this default by contacting Global Support.

Example

This sample code performs a HTTP GET and returns the response:

This sample code performs a HTTP GET and returns the response object: