Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Overview

Imports a HTTP header on request.

RestRequest myRestRequest.AddHeader(name: string, value: string)

Arguments

string name
Name of HTTP header
string value
Value of HTTP header

Remarks

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

Example

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');
  • No labels