This section details synchronous methods. Each method in this section returns a Response object. Methods The following methods return either a Response object, or a Promise object that will eventually resolve to a Response object, if asynchronous. Asynchronous means that the method will be called, but will not block script execution - so multiple asynchronous calls to network services can be made in succession, without each call "waiting" for the result of the previous. Parameters for these functions are documented below. Method | Description | Return type |
---|
.get() | Sends an HTTP GET call, blocking for a response. | Response | .getAsync() | Sends an HTTP GET call without blocking. | Promise | .post() | Sends an HTTP POST call, blocking for a response. | Response | .postAsync() | Sends an HTTP POST call without blocking. | Promise | .put() | Sends an HTTP PUT call, blocking for a response. | Response | .putAsync() | Sends an HTTP PUT call without blocking. | Promise | .delete() | Sends an HTTP DELETE call, blocking for a response. | Response | .deleteAsync() | Sends an HTTP DELETE call without blocking. | Promise | .patch() | Sends an HTTP PATCH call, blocking for a response. | Response | .patchAsync() | Sends an HTTP PATCH call without blocking. | Promise | .head() | Sends an HTTP HEAD call, blocking for a response. | Response | .headAsync() | Sends an HTTP HEAD call without blocking. | Promise | .options() | Sends a blocking an HTTP OPTIONS requestcall, blocking for a response. | Response | .optionsAsync() | Sends a non-blocking an HTTP OPTIONS requestcall without blocking. | Promise | .trace() | Sends an HTTP TRACE call, blocking for a response. | Response | .traceAsync() | Sends an HTTP TRACE call, without blocking for a response. | Promise | .request() | Sends an HTTP request, with the verb being dictated by the using a verb specified by the method parameter. Use this method in cases where a non-standard verb is required, and you need the call to block. | Response | .requestAsync() | Sends an HTTP request, with the a verb being dictated specified by the the method parameter. Use this method in cases where a non-standard verb is required, and you do not want the request call to block. | Promise | .getJavaClient() | Returns the underlying Java HTTPClient. | HTTPClient | .getCookieManager() | Returns a CookieManager, which can be used to override the cookie storage policy on the JythonHttpClient. | CookieManager |
Parameters Parameters in this section can be used by any of the methods above. Exceptions to this rule will be defined on each parameter. |