Provides a general use object that can be used to send and receive RESTful HTTP requests. The object created by this function is a wrapper around Java's HttpClient class. Typical use involves creating the a Usage requires creating a
This scripting function has no Client Permission restrictions.
Integer timeout - A value, in milliseconds, to set the client’s connect timeout setting to. [Optional. Defaults to 60000.]
Boolean bypass_cert_validation - A value, in milliseconds, to set the client’s read timeout setting toboolean indicating whether the client should attempt to validate the certificates of remote servers, if connecting via HTTPS/SSL. [Optional. Defaults to FalseTrue.]
String username - A string indicating the username to use for authentication if the remote server requests authentication; specifically, by responding with a WWW-Authenticate or Proxy-Authenticate header. Only supports Basic authorizationauthentication. If If
String password - A string indicating the password to use for authentication. [Optional. Defaults to None.]
String proxy - The address of a proxy server, which will be used for HTTP and HTTPS traffic. If the a port is not specified as part of that address, it will be assumed from the protocol in the URL, i.e. 80/443. [Optional. Defaults to None.]
String redirect_policy - A string representing this client’s redirect policy. Acceptable values are listed below. [Optional. Defaults to "Normal".]
Callable customizer - A reference to a callable function. This function will be called with one argument (an instance of HttpClient.Builder). The function should operate on the builder class and that builder instance, which allows for arbitrary customization of the created HTTP client. [Optional. Defaults to None.]
JythonHttpClient - An object wrapped around an instance of Java's s HttpClient class. The client The httpClient object has methods that can be called against a website to get or send information through the webto execute HTTP requests against a server. See the panel below for more details.
Gateway, Vision Client, Perspective Session
Once a JythonHttpClient object has been created, HTTP calls it can be used to handle many HTTP requests without needing to create a new client. Individual HTTP requests can be made with the build in methods detailed below. The various methods available on this object can be split under different categories.
Parameters in this section can be used by any of the methods above. Exceptions to this rule will be defined on each parameter.
String url - The URL to connect to. [Required]
String method - The method to use in the request. [Required - used by . Used by
String or Dictionary params - Parameters to append to the URLURL parameters to send with the request. [Optional. Defaults to None.]
String or Dictionary or byte data - Data to send in the request. [Optional - . Defaults to None.]
String file - The path to a file, relative to the HTTP client instance. If specified, and the path is valid, will directly send the data in the file will be sent to the remote server. The file attribute overrides any value set in data; only the file’s data will be sent. [Optional. Defaults to None.]
Dictionary headers - A dictionary of HTTP headers to add to send with the request. [Optional. Defaults to None.]
String username - Username to add to a Basic Authorization header in the outgoing request. If If
String password - Password to add to a Basic Authorization header in the outgoing request. [Optional. Defaults to None.]
Integer timeout - Timeout The read timeout for this request, in milliseconds. [Optional. Defaults to 60000.]
Once a Each JythonHttpClient object has been created, HTTP calls can be made with the build in methods detailed below. The various methods available on this object can be split under different categoriesinstance has an attached CookieManager. This CookieManager can be accessed to retrieve cookies set by external web services, or to set cookies (ie, for authentication) before a request is made.
CookieManager Methods and Attributes
This section documents the Response object, generally returned by the blocking request methods returned by on the JythonHttpClient object. This object is simply a wrapper for Java's HTTPResponse object.
Response Methods and Attributes
This section documents the Promise object, generally which is returned by the non-blocking methods returned by asynchronous methods available on the JythonHttpClient object. This object is simply a wrapper for around Java's CompletableFuture object that returns some type
Promise Methods and Attributes
This section documents the RequestWrapper object, which is simply a wrapper around Java's HTTPRequest object.RequestWrapper Methods
, which is simply a wrapper around Java's HTTPRequest object. This object can be used to determine details about the request that was originally sent to populate a Response object.
RequestWrapper Methods and Attributes
system nav httpClient, nav.httpClient