Method DetailaddData(Data data) Adds data to request body. Used if request body created from fragment
Parameters:
Since: 12-22-2009 addDataList(DataList datalist) Adds datalist to request body. Used if request body created from fragment
Parameters:
Since: 12-22-2009 checkConnection(boolean enabled) Enables DNS and certificate details (if any) to be gathered during the request and provided in Response.getConnectionInfo().
Parameters:
Since: 07-12-2013 clearFormParameters() Removes all for parameters set for this request Since: 12-23-2009 clearHeaders() Removes all request headers set for this request Since: 12-23-2009 XMLReader createServicePayload(Attachment attachment) Creates an XMLReader from the contents of the attachment. This is primarily used for testing or re-analyzing a stored response. The attachment must be XML.
Parameters:
Returns: XMLReader Since: 08-27-2010 XMLReader createServicePayload(File file) Creates an XMLReader from the contents of the file. This is primarily used for testing or re-analyzing a stored response. The file must be XML.
Parameters:
Returns: XMLReader Since: 08-27-2010 echo(boolean enabled) If enabled, this tells the ServiceRequest to bundle the request and submit to itself. Credentials are masked. This is used for troubleshooting requests so developers can analyze the payload and headers being sent.
Parameters:
Since: 09-27-2010 Data getFormParameters() Returns a read-only copy of the form parameters for this request. Returns: Data Since: 06-16-2021 ServiceResponse getLastResponse() Returns last response for this request. This method returns null if the request wasn't submitted yet Returns: ServiceResponse Since: 12-22-2009 String resolveHost(String host) Returns the resolved IP address of the host
Parameters:
Returns: String Since: 03-25-2016 setAWS(String accessKeyId, String secretAccessKey, String region, String service) Configures this request for AWS authentication.
Parameters:
Since: 11-07-2016 setAWSProvider(StorageProvider storageProvider, String service) Configures this request for AWS authentication using credentials and region from the specified storage provider. Works only for AWS S3 provider settings.
Parameters:
Since: 01-08-2020 setAttachment(String varName, Attachment attachment) Adds the attachment. Content is set as base64
Parameters:
Since: 05-31-2010 setAuthenticationPreemptive(boolean enabled) Enables preemptive authentication mode. In this mode ServiceRequest will send the basic authentication even before the server gives an unauthorized response in certain situations, thus reducing the overhead of making the connection. This method has effect only if authentication is controlled by ServiceRequest (true by default), see setSendAuthorization()
Parameters:
Since: 08-25-2010 setBasicAuthorization(String name, String password) Sets basic authorization for this request. Note: this method has no effect if request submitted using connector settings
Parameters:
Since: 12-22-2009 setContentType(String contentType) Sets content type of this request. Default value is application/xml
Parameters:
Since: 12-22-2009 setCoreDocument(String varName, Document doc) Adds the XML of the dta:Document element including all references. Content is set as base64.
Parameters:
Since: 05-31-2010 setEncoding(String encoding) Sets (or removes) the character encoding of the request. Default is UTF-8.
Parameters:
Since: 06-13-2013 setFile(String varName, File file) Adds the file. Content is set as base64
Parameters:
Since: 05-31-2010 setFormParameter(String name, String value) Sets request form parameter. Note: this method has no effect for POST and PUT methods if request body set from fragment or string
Parameters:
Since: 12-23-2009 setFormParameters(Data data) Sets request form parameters from data. Note: this method has no effect for POST and PUT methods if request body set from fragment or string
Parameters:
Since: 12-23-2009 setFragment(Fragment fragment) Set fragment of type "service request" as this request body
Parameters:
Since: 12-22-2009 setFragmentFormParameter(String name, Fragment value) Sets request form parameter from fragment. Note: this method has no effect for POST and PUT methods if request body set from fragment or string
Parameters:
Since: 12-23-2009 setIgnoreStatusCodes(boolean ignore) Allows to ignore http status code of response and use response body in error state. Useful for dealing with SOAP
Parameters:
Since: 02-01-2010 setMethod(String method) Sets http method for this request. Default is POST. Note that only POST and PUT methods will allow to send request body
Parameters:
Since: 12-22-2009 setNTLMAuthorization(String name, String password, String domain) Sets NTLM authorization for this request. Note: this method has no effect if request submitted using connector settings
Parameters:
Since: 12-22-2009 setOauth(String privateKey, Data params) Configures this request for OAuth authentication. Standard oauth parameters in the Data are used to construct the Authorization header. The platform will construct the minimum necessary and pass through any parameters not needing to be changed during signature calculations. Required data elements: oauth_consumer_secret (for hmac-sha1), oauth_consumer_key, and oauth_signature_method (should be rsa-sha1, hmac-sha1, or plaintext). You may also provide oauth_nonce and oauth_timestamp if desired (i.e. for testing) but these will be provided if not present.
Parameters:
Since: 01-13-2015 setPacket(String varName, Packet packet) Adds the XML of the entire transaction packet without a dsig wrapper. Content is set as base64
Parameters:
Since: 05-31-2010 setPdfDocument(String varName, Document doc) Adds the doc as a PDF. If the document is not already PDF it is converted to PDF. Content is set as base64.
Parameters:
Since: 05-31-2010 setRequestBody(String body) Sets free-form string request body. Useful for request with JSON body
Parameters:
Since: 12-22-2009 setRequestHeader(String header, String value) Adds request header or removes it if value is null
Parameters:
Since: 12-22-2009 setSendAuthorization(boolean send) Enables or disables sending HTTP authorization header if user and password specified. Allows to control authorization manually. Enabled by default.
Parameters:
Since: 06-09-2010 setTimeout(int connectTimeout, int dataTimeout) Sets the maximum timeout for the connection to (a) connect and (b) wait for data before terminating the connection. Default is 15 seconds for connect and 30 seconds for data.
Parameters:
Since: 07-24-2013 sign(String signatureId, String key) Completes the digital signature identified by signatureId.
Parameters:
Since: 03-21-2013 ServiceResponse submit(String url, boolean failOnSSLHandshake, boolean allowRedirect) Submits request to specified url. failOnSSLError used for https connections. If failOnSSLError set to true request will fail if remote host certificate do not pass validation. allowRedirect=false is more secure and should be used if you know the remote service does not forward requests to a new location. Check response code and message.
Parameters:
Returns: ServiceResponse Since: 10-08-2015 ServiceResponse submitUsingConnector(String connector) Submits request using connector settings defined for enterprise
Parameters:
Returns: ServiceResponse Since: 12-22-2009 ServiceResponse submitUsingConnector(String connector, String url) Submits request using connector settings defined for enterprise. Allows to redefine url for submit. Url can be absolute or relative. Relative urls are appended to the connector url.
Parameters:
Returns: ServiceResponse Since: 07-21-2010 String urlEncode(String value) Performs URL-encoding of specified value
Parameters:
Returns: String Since: 12-22-2009 |
Copyright © 2006 - 2024, ContractPal, Inc. All rights reserved. | API Date: Nov 22, 2024 11:54 AM |