httpPut
Version 25.3.9469
Version 25.3.9469
httpPut
Issue an HTTP PUT request to an API endpoint.
Required Parameters
- url: The URL to which the PUT request is issued.
Optional Parameters
- timeout: The timeout, in seconds, for the operation to complete. Zero (0) means no timeout. The default is
60. - proxy_server: The IP address or host name of the proxy server used for the request.
- proxy_auto: Whether or not the proxy should be detected from Windows system settings. This takes precedence over other proxy settings and is not available in Java. Allowed values are
TRUEorFALSE. The default isFALSE. - proxy_port: The port number of the proxy server.
- proxy_user: The user Id used to authenticate with the proxy server.
- proxy_password: The password used to authenticate with the proxy server.
- proxy_authscheme: The authentication scheme of the proxy server. Allowed values are
BASIC,DIGEST,PROPRIETARY,NONE, andNTLM. The default isBASIC. - proxy_authtoken: The proxy authentication token.
- proxy_ssltype: The SSL/TLS type of the proxy server. Allowed values are
AUTO,ALWAYS,NEVER, andTUNNEL. The default isAUTO. - firewall_server: The firewall IP address or host name.
- firewall_port: The firewall port number.
- firewall_user: The user Id used to authenticate with the firewall.
- firewall_password: The password used to authenticate with the firewall.
- firewall_type: The firewall type. Allowed values are
NONE,TUNNEL,SOCKS4, andSOCKS5. The default isNONE. - internalconfig#: Sets an internal configuration setting.
- charset: The charset of the exchanged/transferred data. The default is
UTF-8. - httpversion: Version of the HTTP protocol to use. Allowed values are
1.0or1.1. The default is1.1. - cookie:*: Any cookies to add to the request.
- followredirects: Whether or not to follow HTTP redirects. Allowed values are
TRUEorFALSE. The default isTRUE. - 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: The name of the certificate store for the client certificate.
- sslclientcerttype: The store type of the client certificate. Allowed values are
USER,MACHINE,PFXFILE,PFXBLOB,JKSFILE,JKSBLOB,PEMKEY\_FILE,PEMKEY\_BLOB,PUBLIC\_KEY\_FILE,PUBLIC\_KEY\_BLOB,SSHPUBLIC\_KEY\_BLOB,P7BFILE,P7BBLOB,SSHPUBLIC\_KEY\_FILE,PPKFILE,PPKBLOB,XMLFILE, andXMLBLOB. - sslclientcertpassword: The password of the client certificate.
- sslclientcertsubject: The subject of the client certificate. Using an asterisk finds the first certificate in the store.
- user: The username to authenticate with if the authscheme parameter is set to something other than
NONE. - password: The password to authenticate with if the authscheme parameter is set to something other than
NONE. - authscheme: The authorization mechanism to use. Only relevant if user and password are provided. Allowed values are
BASIC,DIGEST,NONE, andNTLM. The default isBASIC. - version: The OAuth version. Use OAuth to authorize the request. Allowed values are
Disabled,1.0, and2.0. The default isDisabled. - token: The request token for OAuth.
- token_secret: The request token secret. Applicable for OAuth 1.0 only.
- sign_method: The signature method used to calculate the signature for OAuth 1.0. Allowed values are
HMAC-SHA1andPLAINTEXT. The default isHMAC-SHA1. - client_id: The client Id. Applicable for OAuth 1.0 only.
- client_secret: The client secret. Applicable for OAuth 1.0 only.
- header:name#: The name for each custom header to pass with the request.
- header:value#: The value for each custom header to pass with the request.
- paramname#: The name for each parameter to pass with the request.
- paramvalue#: The value for each parameter to pass with the request.
- putdata: Data to include in the PUT. Use
file://followed by a file path to put the contents of a file. - contenttype: The content type for the POST. The default is
text/html.
Output Attributes
- ssl:issuer: The issuer of the SSL/TLS certificate.
- ssl:subject: The subject of the SSL/TLS certificate.
- http:statuscode: The HTTP status code returned from the request.
- http:content: The content of the HTTP response.
- cookie:*: The cookies returned with the response.
- http:allcookies: All of the cookies from the response, returned as a single string.
- header:*: The headers returned with the response.
Examples
Using a Raw PUT Body
<!-- Setting the url, putdata and content type of the request -->
<arc:set attr="http.URL" value="https://postman-echo.com/put" />
<arc:set attr="http.putdata" value="file://[FilePath]" />
<arc:set attr="http.contenttype" value="text/html" />
<!-- Adding an HTTP header to the PUT 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="httpPut" 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/put" />
<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 PUT 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="httpPut" 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" />