public class HttpsRequest
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
HttpsRequest() |
|
HttpsRequest(java.net.URL url,
HttpsMethod method,
byte[] body,
java.lang.String userAgentString)
Constructor.
|
|
HttpsRequest(java.net.URL url,
HttpsMethod method,
byte[] body,
java.lang.String userAgentString,
ProxySettings proxySettings)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBody() |
java.lang.String |
getHttpMethod() |
java.lang.String |
getRequestHeaders() |
java.net.URL |
getRequestUrl() |
HttpsResponse |
send()
Executes the HTTPS request.
|
HttpsResponse |
sendAsHttpRequest()
Executes the HTTPS request as an HTTP request.
|
HttpsRequest |
setConnectTimeout(int timeout)
Sets the connect timeout, in milliseconds, for the request.
|
HttpsRequest |
setHeaderField(java.lang.String field,
java.lang.String value)
Sets the header field to the given value.
|
HttpsRequest |
setReadTimeout(int timeout)
Sets the read timeout, in milliseconds, for the request.
|
HttpsRequest |
setSSLContext(javax.net.ssl.SSLContext sslContext)
Sets this object's SSL context
|
public HttpsRequest(java.net.URL url,
HttpsMethod method,
byte[] body,
java.lang.String userAgentString)
url - the URL for the request.method - the HTTPS request method (i.e. GET).body - the request body. Must be an array of size 0 if the request
method is GET or DELETE.userAgentString - the user agent string to attach to all http communicationspublic HttpsRequest(java.net.URL url,
HttpsMethod method,
byte[] body,
java.lang.String userAgentString,
ProxySettings proxySettings)
url - the URL for the request.method - the HTTPS request method (i.e. GET).body - the request body. Must be an array of size 0 if the request
method is GET or DELETE.userAgentString - the user agent string to attach to all http communicationsproxySettings - The proxy settings to use when connecting. If null then no proxy will be usedprotected HttpsRequest()
public HttpsResponse send() throws TransportException
TransportException - if the connection could not be established, or the
input/output streams could not be accessed.public HttpsResponse sendAsHttpRequest() throws TransportException
HttpsHsmClient
for some edge workload urls.TransportException - if the connection could not be established, or the
input/output streams could not be accessed.public HttpsRequest setHeaderField(java.lang.String field, java.lang.String value)
field - the header field name.value - the header field value.public HttpsRequest setReadTimeout(int timeout)
timeout - the read timeout.public HttpsRequest setConnectTimeout(int timeout)
timeout - the connect timeout in milliseconds.public HttpsRequest setSSLContext(javax.net.ssl.SSLContext sslContext) throws java.lang.IllegalArgumentException
sslContext - the value to set this object's SSL context toojava.lang.IllegalArgumentException - if sslContext is nullpublic byte[] getBody()
public java.net.URL getRequestUrl()
public java.lang.String getHttpMethod()
public java.lang.String getRequestHeaders()
Copyright © 2023. All rights reserved.