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
Syntax
objectname.SetHeader ( string headerName, string headerValue )
Argument |
Description |
---|---|
objectname |
A reference to the TokenRequest object in which you want to set the request header. |
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":
int li_return TokenRequest lnv_TokenRequest li_return = lnv_TokenRequest.setheader("content-type", "application/x-www-form-urlencoded")
See also
Description
Sets the request header.
Applies to
Syntax
objectname.SetHeader ( string headerName, string headerValue )
Argument |
Description |
---|---|
objectname |
A reference to the OAuthRequest object in which you want to set the request header. |
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:
int li_return OAuthRequest lnv_OAuthRequest li_return = lnv_OAuthRequest.setheader("content-type", "application/x-www-form-urlencoded")
See also