Skip to main content
Skip table of contents

HttpPost

Invokes a HTTP POST REST service request and stores result either in a file or a string variable. An optional request body can be specified.

Properties

Input

Name

Description

UrlURL for service request
VerbDefault: "POST". Optionally you can use other HTTP verbs like "PUT" or "PATCH"
Authorization

Integrated support for various authorization methods:

  • Basic = Basic Authorization header
  • Dpe = DPE authorization header
  • DpeOidc = DPE autorization with OIDC
  • AwsUrlSignature = AWS4 signature method

More information can be found in the examples below.

TimeoutTimeout, default: 60000ms
Accept

Optional: accept header,

e.g. "application/json" or "application/xml"

ContentTypeOptional: specifies MIME type of request body, e.g. "application/json"
ContentLengthOptional, default: -1, i.e. it is not set
InputPathOptional path to a file uploaded as request body
InputStringOptional string uploaded as request body
QueryParameters

Optional: dictionary with query parameters

Query parameters can be specified directly in the Url and/or in this dictionary. 

When using AwsUrlSignature you have to specify query parameters only here and not in the Url directly.

Headers

Optional: additional headers, e.g.

new Dictionary(Of String, String) () From
{
  {"Dpe-Auth", "DpeToken Mj...M="}
}

OptionsAdditional options. See examples below.
RetriesRetries, default: 0
RetraDelayMsDelay between retries (in milliseconds)
ThrowExceptionThrow exception on failures (after last retry), default: true. If set to false you can detect problems by checking the StatusCode

Output

Name

Description

OutputPathPath to a file where the result is downloaded to
OutputStringVariable to store the result (if OutputPath is not set)
StatusCodeHTTP response status code, e.g. 200
OutputHeadersOptional dictionary variable to retrieve response headers

Available Symbolic Variables

URL

VariableDescription
{ServiceRootAddress}
Will be replaced with base path to DPE services, e.g. "{ServiceRootAddress}/api/entries" would be replaced with something like "https:/MyServer:MyPort/DpeWebApplication/api/entries"

QueryParameters

VariableDescription
{"X-Amz-Credential", "{auto}"}

Available when using Authorization=AwsUrlSignature.

Value will be calculated automatically according to AWS4 Signature method.

{"X-Amz-Date", "{auto}"}

Available when using Authorization=AwsUrlSignature.

Value will be calculated automatically according to AWS4 Signature method.

Headers

VariableDescription
{"Content-MD5", "{auto}"}

Available when using Authorization=AwsUrlSignature.

Value will be calculated automatically from the payload according to AWS4 Signature method.

{"x-amz-content-sha256", "{auto}"}


Available when using Authorization=AwsUrlSignature.

Value will be calculated automatically from the payload according to AWS4 Signature method.

Needed when your AWS service only accepts hashed payloads.



Example calling DPE REST Service

Update entry metadata

HttpPost Properties

Use symbolic variable {ServiceRootAddress} in your Url.

Set Authorization to "Dpe" and the HttpPost activity will automatically geneate a Dpe-Auth token from User and Password. You don't have to set any manually calculated authorization headers.



Example calling AWS4 S3

Uploading an audio file

Arguments

HttpPost Properties

QueryParameters

CODE
new Dictionary(Of String, String) from
{
  {"X-Amz-Algorithm", "AWS4-HMAC-SHA256"},
  {"X-Amz-Credential", "{auto}"},
  {"X-Amz-Date", "{auto}"},
  {"X-Amz-Expires", "86400"}
}

Headers

CODE
new Dictionary(Of String, String) from
{
  {"Cache-Control", "public"},
  {"Content-MD5",  "{auto}"},
  {"x-amz-acl", "public-read"},
  {"x-amz-storage-class", "INTELLIGENT_TIERING"},
  {"x-amz-meta-musicid", MusicId},
  {"x-amz-meta-radio", Radio},
  {"x-amz-meta-show", Show},
  {"x-amz-meta-title","Test" + MusicId}
}

Options

CODE
new Dictionary(Of String, String) From
{
  { "AwsRegion", AwsRegion},
  { "AwsService", AwsService},
  { "AwsAccessKey", AwsAccessKey},
  { "AwsSecretKey", AwsSecretKey}
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.