httpPost

Version 23.4.8841


httpPost

Version 23.4.8841


Issue an HTTP POST request to an API endpoint.

必要なパラメータ

  • url:The URL to which the POST request is issued.

オプションのパラメータ

  • timeout:オペレーションが完了するまでのタイムアウト(秒)。ゼロ(0)はタイムアウトなしを意味します。デフォルトは60 です。
  • proxy_server:The IP address or host name of the proxy server used for the request.
  • proxy_auto:Windows システム設定からプロキシが検出されるかどうか。これは他のプロキシ設定より優先され、Java では使用できません。TRUE またはFALSE が使用可能です。デフォルト値はFALSE です。
  • proxy_port:プロキシサーバーのポート番号。
  • proxy_user:プロキシサーバーに認証するためのユーザーId。
  • proxy_password:プロキシサーバーに認証するためのパスワード。
  • proxy_authscheme:プロキシサーバーの認証スキーム。BASICDIGESTPROPRIETARYNONE、およびNTLM が使用可能です。デフォルト値はBASIC です。
  • proxy_authtoken:プロキシ認証トークン。
  • proxy_ssltype:プロキシサーバーのSSL/TLS タイプ。AUTOALWAYSNEVER、およびTUNNEL が使用可能です。デフォルトはAUTO です。
  • firewall_server:ファイアウォールのIP アドレスまたはホスト名。
  • firewall_port:ファイアウォールのポート番号。
  • firewall_user:ファイアウォールに認証するためのユーザーId。
  • firewall_password:ファイアウォールに認証するためのパスワード。
  • firewall_type:ファイアウォールのタイプ。NONETUNNELSOCKS4、およびSOCKS5 が使用可能です。デフォルト値はNONE です。
  • internalconfig#:内部コンフィギュレーション設定の設定。
  • charset:The charset of the exchanged/transferred data.デフォルトはUTF-8 です。
  • httpversion:Version of the HTTP protocol to use.1.0 または1.1 が使用可能です。デフォルトは1.1 です。
  • cookie:*:リクエストに追加する任意のCookie。
  • followredirects:Whether or not to follow HTTP redirects.TRUE またはFALSE が使用可能です。デフォルト値はTRUE です。
  • sslcert:The SSL/TLS certificate to be accepted from the server.This can take the form of a full PEM certificate, the path to a file containing the certificate, the public key, the MD5 thumbprint, or the SHA-1 thumbprint.Any certificate other than the one specified is rejected.If unspecified, this value defaults to TRUSTED, which means only certificates trusted by the system are accepted.If set to *, any certificate is accepted.
  • sslclientcert:クライアント証明書のための証明書ストア名。
  • sslclientcerttype:クライアント証明書のストアタイプ。USERMACHINEPFXFILEPFXBLOBJKSFILEJKSBLOBPEMKEY\_FILEPEMKEY\_BLOBPUBLIC\_KEY\_FILEPUBLIC\_KEY\_BLOBSSHPUBLIC\_KEY\_BLOBP7BFILEP7BBLOBSSHPUBLIC\_KEY\_FILEPPKFILEPPKBLOBXMLFILE、およびXMLBLOB が使用可能です。
  • sslclientcertpassword:クライアント証明書のパスワード。
  • sslclientcertsubject:クライアント証明書のサブジェクト。Using an asterisk finds the first certificate in the store.
  • user:authscheme パラメータがNONE 以外に設定されている場合に認証するユーザー名。
  • password:authscheme パラメータがNONE 以外に設定されている場合に認証するパスワード。
  • authscheme:使用する認可メカニズム。ユーザーとパスワードが提供された場合のみ適用されます。BASICDIGESTNONE、およびNTLM が使用可能です。デフォルト値はBASIC です。
  • version:OAuth のバージョン。Use OAuth to authorize the request.Disabled1.0、および2.0 が使用可能です。デフォルト値はDisabled です。
  • token:The request token for OAuth.
  • token_secret:The request token secret.OAuth 1.0 でのみ利用可能です。
  • sign_method:OAuth 1.0 で署名を計算する際の署名メソッド。HMAC-SHA1 およびPLAINTEXT が使用可能です。デフォルト値はHMAC-SHA1 です。
  • client_id:クライアントId。OAuth 1.0 でのみ利用可能です。
  • client_secret:クライアントシークレットOAuth 1.0 でのみ利用可能です。
  • header:name#:リクエストで渡す各カスタムヘッダーの名前。
  • header:value#:リクエストで渡す各カスタムヘッダーの値。
  • paramname#:リクエストで渡す各パラメータの名前。
  • paramvalue#:リクエストで渡す各パラメータの値。
  • formencoding:When passing parameters via paramname# and paramvalue#, the type of encoding to use.Allowed values are URLENCODED and FORMDATA.The default is URLENCODED.
  • postdata:POST に含めるデータ。file:// の後にファイルパスを使用して、ファイルのコンテンツを送信します。
  • contenttype:POST のコンテンツタイプ。デフォルトはapplication/x-www-form-urlencoded です。
  • logfile:リクエストとレスポンスのデータをログに記録するためのファイルへのフルパス。verbosity と併用する必要があります。
  • verbosity:ログファイルの冗長性。1(最小)から5(最大)。

アウトプット属性

  • ssl:issuer:SSL/TLS 証明書の発行者。
  • ssl:subject:SSL/TLS 証明書のサブジェクト。
  • http:statuscode:リクエストから返されたHTTP ステータスコード。
  • http:content:HTTP レスポンスのコンテンツ。
  • cookie:*:レスポンスで返されたCookie。
  • http:allcookies:単一の文字列として返された、レスポンスからのすべてのCookie。
  • header:*:レスポンスで返されたヘッダー。

Using a Raw POST Body

<!-- Setting the url, postdata and content type of the request -->
<arc:set attr="http.URL" value="https://postman-echo.com/post" />
<arc:set attr="http.postdata" value="file://[FilePath]" />
<arc:set attr="http.contenttype" value="application/xml" />
<!-- Adding an HTTP header to the POST request -->
<arc:set attr="http.header:name#1" value="mySpecialHeader" />
<arc:set attr="http.header:value#1"value="Foo" />
<!-- Setting the credentials via basic authentication -->
<arc:set attr="http.user" value="postman" />
<arc:set attr="http.password" value="password" />
<!-- Optional logging parameter. Useful when troubleshooting a request -->
<arc:set attr="http.logfile" value="/tmp/httpLog.txt" />
<arc:set attr="http.verbosity" value="3" />

<!-- Passing in the http input item to the call and setting the data of the output file to be the HTTP response -->
<arc:call op="httpPost" in="http" out="response">
  <arc:set attr="output.data" value="[response.http:content]" />
</arc:call>

<!-- Setting the output filename and pushing the file out -->
<arc:set attr="output.filename" value="httpResponseContent.txt" />
<arc:push item="output" />

Using Form Data as the Body

<!-- Setting the url, content type and form encoding of the request -->
<arc:set attr="http.URL" value="https://postman-echo.com/post" />
<arc:set attr="http.contenttype" value="application/x-www-form-urlencoded" />
<arc:set attr="http.formencoding" value="URLENCODED" />
<!-- Setting the form data via paramname/paramvalue -->
<arc:set attr="http.paramname#1" value="Fee" />
<arc:set attr="http.paramvalue#1" value="Fie" />
<arc:set attr="http.paramname#2" value="Foe" />
<arc:set attr="http.paramvalue#2" value="Fum" />
<!-- Adding an HTTP header to the POST request -->
<arc:set attr="http.header:name#1" value="mySpecialHeader" />
<arc:set attr="http.header:value#1"value="Foo" />
<!-- Setting the credentials via basic authentication -->
<arc:set attr="http.user" value="postman" />
<arc:set attr="http.password" value="password" />
<!-- Optional logging parameter. Useful when troubleshooting a request -->
<arc:set attr="http.logfile" value="/tmp/httpLog.txt" />
<arc:set attr="http.verbosity" value="3" />

<!-- Passing in the http input item to the call and setting the data of the output file to be the HTTP response -->
<arc:call op="httpPost" in="http" out="response">
  <arc:set attr="output.data" value="[response.http:content]" />
</arc:call>

<!-- Setting the output filename and pushing the file out -->
<arc:set attr="output.filename" value="httpResponseContent.txt" />
<arc:push item="output" />