Skip to main content
An HTTP request with the multipart/form-data content type.

Properties

NameTypeDescription
UrlstringThe resource URL.
MethodstringThe request type (for example, GET or POST).
AuthTokenstringAuthentication token (if external service authentication is required).
AuthSchemestringAuthentication scheme.
ThrowExceptionOnFailedbooleanSpecifies whether an exception should be generated when the external service returns an error code as the HTTP response status. If set to False, exceptions are not generated, and the HTTP status code is stored in the Status property. Set to True by default.
TimeoutnumberResponse timeout in minutes. Set to 1 minute by default. Important! The request timeout value cannot be greater than the script runtime restriction (600 seconds).
ResponseTextstring, read-onlyThe response results in text format.
ResponseTypestring, read-onlyThe type of request response returned by the service, for example, “application/json”.
StatusnumberThe external service HTTP response status code. If ThrowExceptionOnFailed is set to True, an error code will generate an exception and the transaction will be interrupted. The error message text can be viewed in Skill Monitor.

Methods

NameDescription
AppendStringContent(string data, string contentName);Adds a multipart/form-data string to the request body (by default, the content type is set to application/json with UTF8 encoding). The contentName parameter specifies the field name in passable format.
AppendStringContent(string data, string contentName, ContentEncoding contentEncoding, string mediaType?);Adds a multipart/form-data string to the request body. In addition, allows the encoding to be specified. If the content type is not specified, it is set to “application/json” by default.
AppendFileContent(DocumentExportResult documentExportResult, string contentName, string mediaType?);Adds multipart/form-data binary data to the request body. The content type is set automatically based on the extension of the file being passed. If required, the content type can be set in advance using the mediaType optional parameter.
AppendFileContent(BinaryFile binaryFile, string contentName, string mediaType?);Adds the following binary data to the request body: the source image imported to the transaction, or the image contained in the field of type Picture. The content type is set automatically based on the extension of the file being imported. If required, the content type can be set in advance using the mediaType optional parameter.
AppendSourceFileContent(string contentName, string mediaType?);Adds binary data from the source image imported to the transaction to the request body. The content type is set automatically based on the extension of the file being imported. 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 AppendFileContent() method instead.
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.