Before you execute a request, you need to configure it first.
The most common things you want to do:
The XPRIM_HttpRequest has properties Options and Content, through which you can configure the above settings.
Options
The Options property contains members that control the behavior of the request.
| XPRIM_HttpRequest | HttpClientRequest | |
|
AddBasicAuthorization |
Yes |
Yes |
|
AddBearerAuthorization |
Yes |
Yes |
|
AddHeader |
Yes |
Yes |
|
SetMiscProperty |
Yes |
Yes |
|
SetTimeout (method) |
Yes |
- |
|
Timeout (property) |
- |
Yes |
Content
The Content property contains members that allow you to add content to your request body.
| XPRIM_HttpRequest | HttpClientRequest | |
|
AddFile |
Yes |
Yes |
|
AddJson |
Yes |
Yes |
|
AddJsonArray |
Yes |
Yes |
|
AddJsonObject |
Yes |
Yes |
|
AddString |
Yes |
Yes |
|
AddUrlEncodedFormValue |
Yes |
Yes |
|
AppendString |
- |
Yes |
|
ContentInfo (Property) |
Yes |
Yes |