httpUpload

Version 23.4.8841


httpUpload

Version 23.4.8841


Issue an HTTP POST request using multipart/form-data to upload files to an API endpoint compliant with RFC 1867.

必要なパラメータ

  • url:The URL to which the POST request is issued.
  • file:*:The path to a file to upload.The format of this attribute must include a value after the colon and a value parameter (see the example below).

オプションのパラメータ

  • name:*:Used to override the name field of the form data set by the file attribute.
  • filename:*:Used to override the filename field of the form data set by the file attribute.
  • 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#:リクエストで渡す各カスタムヘッダーの値。
  • form:*:Form input variable data to include in the POST.

アウトプット属性

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

<!-- Setting the url and upload file for the request -->
<arc:set attr="http.URL" value="https://postman-echo.com/post" />
<arc:set attr="http.file:myfile" value="[FilePath]" />
<!-- Overriding the name and filename attribute on the request -->
<arc:set attr="http.name:myfile" value="myNewFile" />
<arc:set attr="http.filename:myfile" value="customFilename.txt" />
<!-- Setting additional form data on the request -->
<arc:set attr="http.form:hello" value="world" />
<arc:set attr="http.form:foo" value="bar" />
<!-- Adding an HTTP header to the 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="httpUpload" 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" />