Get
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.
The Get()
function has three parameters.
destinationUrl
(string): Required. The destination URL for the HTTP GET request.headerNames
(array): An array of header names to include in the request.headerValues
(array): An array of header values to include in the request.
Marketing Cloud Engagement recognizes any character set returned in the HTTP headers by setting the appropriate Content-Type
header. For example, you can use a UTF-8 encoded HTML file by including Content-Type: text/html; charset=utf-8
in the header. If you don’t specify the encoding in the header, data is returned using the WindowsCodePage 1252 character set. To change the default content type, contact Salesforce Customer Support.
This sample code performs an HTTP GET and returns the response.
This sample code performs an HTTP GET and returns the response object.