Syntax 1: for TokenRequest objects
Description
Sets the request header. If SetHeader or SetHeaders is not used to
set the header for Authorization, the program will automatically set the
header for Authorization and Content-type.
Applies to
TokenRequest objects
Syntax
|
1 |
objectname.SetHeader ( string headerName, string headerValue ) |
|
Argument |
Description |
|---|---|
|
objectname |
A reference to the TokenRequest object in which you want |
|
headerName |
A string specifying the header name. |
|
headerValue |
A string specifying the header value. |
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
The following example shows the use of the SetHeader function to
set the value of the content-type header to
“application/x-www-form-urlencoded”:
|
1 2 3 4 |
int li_return TokenRequest lnv_TokenRequest li_return = lnv_TokenRequest.setheader("content-type", "application/x-www-form-urlencoded") |
See also