Before you execute a request, you need to configure it first.
The most common things you want to do:
- Construct and add a query string to your URL
- Set authentication details (username/password, or access token)
- Set custom HTTP headers
- Add a content to the request body.
- Set a request timeout (how long we should wait if the server doesn't respond)
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 behaviour of the request.
- AddHeader
- SetTimeout
- AddBasicAuthorization
- AddBearerAuthorization
Content
The Content property contains members that allow you to add contents to your request body.
- AddUrlEncodedFormValue
- AddJsonObject
- AddJsonArray
- AddString
- AddFile
- ContentInfo (Property)