Provides a general use object that can be used to send and receive HTTP requests. The object created by this function is a wrapper around Java's HttpClient class. Usage requires creating a |
This scripting function has no Client Permission restrictions. |
system.net.httpClient()
Integer timeout - A value, in milliseconds, to set the client’s connect timeout setting to. [Optional. Defaults to 60000.] Boolean bypass_cert_validation - A boolean indicating whether the client should attempt to validate the certificates of remote servers, if connecting via HTTPS/SSL. [Optional. Defaults to True.] 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 authentication. 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 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 cookie_policy - A string representing this client’s cookie policy. Accepts values 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 function. This function will be called with one argument (an instance of HttpClient.Builder). The function should operate on that builder instance, which allows for customization of the created HTTP client. [Optional. Defaults to None.]
JythonHttpClient - An object wrapped around an instance of Java's HttpClient class. The client object has methods that can be called to 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, it can be used to handle many HTTP requests without needing to create a new client. Individual HTTP requests can be made with the methods detailed below. JythonHttpClient Methods
JythonHttpClient Attributes
|
Each JythonHttpClient instance 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, returned by the request methods 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, which is returned by the asynchronous methods available on the JythonHttpClient object. This object is a wrapper around Java's CompletableFuture Promise Methods and Attributes
|
This section documents the RequestWrapper object, 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 |