Class RequestParameters
java.lang.Object
com.ibm.security.access.httpclient.RequestParameters
This class stores the parameter values for a HTTP request.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRetrieve the value for the basic authentication password.Retrieve the value for the basic authentication username.Retrieve the value for the client certificate alias.Retrieve the value for the client certificate keystore.CookieStore
Retrieve the CookieStore.Retrieve the value for the request headers.Retrieve the value for the parameters.Retrieve the value for the request protocol.Retrieve the value for proxy password.Retrieve the value for the proxy server.Retrieve the value for proxy authentication username.int
Retrieve the value for the connection timeout in milliseconds.Retrieve the value for the HTTPS truststore.Retrieve the value for the URL String.boolean
Retrieve the value of the send data as json flag.boolean
Retrieve the value for throw exception on error.void
setBasicAuthPassword
(String basicAuthPassword) Set the value for the basic authentication password.void
setBasicAuthUsername
(String basicAuthUsername) Set the value for the basic authentication username.void
setClientKeyAlias
(String clientKeyAlias) Set the value for the client certificate alias.void
setClientKeyStore
(String clientKeyStore) Set the value for the client certificate keystore.void
setCookieStore
(CookieStore cookieStore) Set the CookieStore.void
setHeaders
(Headers headers) Set the value for the request headers.void
setParameters
(Parameters params) Set the value for the parameters.void
setProtocol
(String protocol) Set the value for the request protocol.void
setProxyPassword
(String proxyPassword) Set the value for proxy password.void
setProxyServer
(String proxyServer) Set the value for the proxy server.void
setProxyUsername
(String proxyUsername) Set the value for proxy authentication username.void
setSendDataAsJson
(boolean sendDataAsJson) Set the value for the send data as json flag.void
setSerializedCookieStore
(String input) Set the CookieStore by deserializing the input.void
setThrowExec
(boolean throwExec) Set the value for throw exception on error.void
setTimeout
(int timeout) Set the value for the connection timeout in seconds.void
setTrustStore
(String trustStore) Set the value for the HTTPS truststore.void
setUrlString
(String urlString) Set the value for the URL String.
-
Constructor Details
-
RequestParameters
public RequestParameters()
-
-
Method Details
-
getUrlString
Retrieve the value for the URL String.- Returns:
- String
-
setUrlString
Set the value for the URL String. This is a mandatory parameter.- Parameters:
urlString
-
-
getHeaders
Retrieve the value for the request headers.- Returns:
- Headers
-
setHeaders
Set the value for the request headers.- Parameters:
headers
-
-
getTrustStore
Retrieve the value for the HTTPS truststore.- Returns:
- String
-
setTrustStore
Set the value for the HTTPS truststore. If not set the truststore name will be set as the advanced configuration property util.httpClientv2.defaultTrustStore.- Parameters:
trustStore
-
-
getBasicAuthUsername
Retrieve the value for the basic authentication username.- Returns:
- String
-
setBasicAuthUsername
Set the value for the basic authentication username. If not set, basic-auth will be disabled.- Parameters:
basicAuthUsername
-
-
getBasicAuthPassword
Retrieve the value for the basic authentication password.- Returns:
- String
-
setBasicAuthPassword
Set the value for the basic authentication password. If not set, basic-auth will be disabled.- Parameters:
basicAuthPassword
-
-
getClientKeyStore
Retrieve the value for the client certificate keystore.- Returns:
- String
-
setClientKeyStore
Set the value for the client certificate keystore. If not set, client certificate authentication will be disabled.- Parameters:
clientKeyStore
-
-
getClientKeyAlias
Retrieve the value for the client certificate alias.- Returns:
- String
-
setClientKeyAlias
Set the value for the client certificate alias. If not set, client certificate authentication will be disabled.- Parameters:
clientKeyAlias
-
-
getProtocol
Retrieve the value for the request protocol.- Returns:
- String
-
setProtocol
Set the value for the request protocol. If not set the protocol will be set as the advanced configuration property util.httpClientv2.defaultSSLProtocol.- Parameters:
protocol
-
-
isThrowExec
public boolean isThrowExec()Retrieve the value for throw exception on error.- Returns:
- boolean
-
setThrowExec
public void setThrowExec(boolean throwExec) Set the value for throw exception on error. If not set a default value of false will be used.- Parameters:
throwExec
-
-
getTimeout
public int getTimeout()Retrieve the value for the connection timeout in milliseconds.- Returns:
- int
-
setTimeout
public void setTimeout(int timeout) Set the value for the connection timeout in seconds. A value of 0 will result in no connection timeout. If not set or set to a value less than 0 the timeout will be set as the advanced configuration property util.httpClientv2.connectTimeout.- Parameters:
timeout
-
-
getProxyServer
Retrieve the value for the proxy server. Example: https://myproxy.com:443- Returns:
- String
-
setProxyServer
Set the value for the proxy server. Example: https://myproxy.com:443 If not set the proxy will be set from the advanced configuration properties: util.httpClientv2.proxyProtocol util.httpClientv2.proxyHost util.httpClientv2.proxyPort If these are also not set then no proxy will be used.- Parameters:
proxyServer
-
-
getProxyUsername
Retrieve the value for proxy authentication username.- Returns:
- String
-
setProxyUsername
Set the value for proxy authentication username.- Parameters:
proxyUsername
-
-
getProxyPassword
Retrieve the value for proxy password.- Returns:
- String
-
setProxyPassword
Set the value for proxy password.- Parameters:
proxyPassword
-
-
getParameters
Retrieve the value for the parameters.- Returns:
- Parameters
-
setParameters
Set the value for the parameters. This is the POST, PUT or PATCH data that will be sent with the request.- Parameters:
params
-
-
isSendDataAsJson
public boolean isSendDataAsJson()Retrieve the value of the send data as json flag.- Returns:
- boolean
-
setSendDataAsJson
public void setSendDataAsJson(boolean sendDataAsJson) Set the value for the send data as json flag. If set to true the data will be sent json formatted. This value will default to false if not explicitly set.- Parameters:
sendDataAsJson
-
-
getCookieStore
public CookieStore getCookieStore()Retrieve the CookieStore.- Returns:
- CookieStore
-
setCookieStore
public void setCookieStore(CookieStore cookieStore) Set the CookieStore.- Parameters:
cookieStore
-
-
setSerializedCookieStore
Set the CookieStore by deserializing the input. Converts a string representation of a CookieStore back into the object.- Parameters:
input
-
-