Page tree
Skip to end of metadata
Go to start of metadata

Overview

RestRequest RestRequest.AddHeader ( name, value )

Imports a HTTP header on request.

Arguments

String name

Name of HTTP header 

String value

Value of HTTP header

Remarks

  • Name and Value arguments are required. Otherwise error is thrown.

Examples

var client = $Rest.Create('https://login.microsoftonline.com/tenant/oauth2/v2.0/token');
var request = client.Request();

request.AddHeader('Content-Type', 'application/x-www-form-urlencoded');
request.AddHeader('Host', 'login.microsoftonline.com');

See Also