| SetHeader(string name, string value); | Sets additional HTTP headers for the request. This method should be called for each header name. |
| Send(); | Sends the HTTP request. |
| SetFileContent(DocumentExportResult documentExportResult, string mediaType?); | Initializes a flow-based HTTP request, allowing exported data to be passed as a file. The type of content being passed is set automatically based on the extension of the exported file, for example, application/json, application/pdf. If required, the content type can be set in advance using the mediaType optional parameter. |
| SetFileContent(BinaryFile binaryFile, string mediaType?); | Initializes a binary data-based HTTP request, passing either the source image file imported when the transaction was created, or the image contained in the field of type Picture. The type of content being passed is set automatically based on the extension of the imported file. If required, the content type can be set in advance using the mediaType optional parameter. |
| SetSourceFileContent(string mediaType?); | Initializes a binary data-based HTTP request, allowing the source image file imported when the transaction was created to be passed. The type of content being passed is set automatically based on the extension of the imported file. If required, the content type can be set in advance using the mediaType optional parameter. Important! This method is deprecated. It will have access only to the first file of the transaction. You should use the SetFileContent() method instead. |
| SetStringContent(string content, ContentEncoding contentEncoding?, string mediaType?); | Initializes a string-based HTTP request. By default Content-Type is set to application/json in UTF8 encoding. If required, you can change both the content and encoding types. |
| SetUrlFormEncodedContent(any content); | Initializes content for a JavaScript object-based request and encodes it as application/x-www-form-urlencoded. The JavaScript object should be initialized as a simple set of property values, e.g.: var form = {}; form.grant_type = "password"; form.scope = "openid permissions"; form.client_id = "value of client_id"; form.client_secret = "value of client_secret"; form.password = "Password"; form.username = "User Name"; request.SetUrlFormEncodedContent(form); |