SetBody
PowerScript function
Description
Sets the request body.
Applies to
OAuthRequest objects
Syntax
1 |
objectname.SetBody ( string data ) |
1 |
objectname.SetBody ( blob data ) |
1 |
objectname.SetBody ( string data, encoding encodingType ) |
Argument |
Description |
---|---|
objectname |
A reference to the OAuthRequest object in which you want |
data |
A string or blob specifying the data. The data will be |
encodingType |
An encoding value specifying the string data. |
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 SetBody function to set
the request body of string data type:
1 2 3 4 5 |
int li_return string ls_data OAuthRequest lnv_OAuthRequest li_return = lnv_OAuthRequest.setbody(ls_data) |
The following example shows the use of the SetBody function to set
the request body of string data type in encodingUTF8!:
1 2 3 4 5 |
int li_return string ls_data OAuthRequest lnv_OAuthRequest li_return = lnv_OAuthRequest.setbody(ls_data, encodingUTF8!) |
The following example shows the use of the SetBody function to set
the request body of blob data type:
1 2 3 4 5 |
int li_return blob lblb_data OAuthRequest lnv_OAuthRequest li_return = lnv_OAuthRequest.setbody(lblb_data) |
See also