SetRequestHeaders

Description

Sets all of the request headers.

Applies to

HTTPClient and RestClient objects

Syntax

objectname.SetRequestHeaders ( headers )

Argument

Description

objectname

The name of the HTTPClient or RestClient object in which you want to set the request header

headers

A string whose value is the information of all of the headers


Return value

Integer.

Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null, the method returns null.

Examples

Integer li_rc
HttpClient lnv_HttpClient
lnv_HttpClient = Create HttpClient
li_rc = lnv_HttpClient.SetRequestHeaders("content-type:application/json; charset=UTF-8~r~nCache-Control:no-cache")

See also

ClearRequestHeaders

GetRequestHeader

GetRequestHeaders

SetRequestHeader