Class RequestParameters
java.lang.Object
com.ibm.security.access.httpclient.RequestParameters
This class stores the parameter values for a HTTP request.
-
Constructor Summary
Constructors -
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.CookieStoreRetrieve 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.intRetrieve the value for the connection timeout in milliseconds.Retrieve the value for the HTTPS truststore.Retrieve the value for the URL String.booleanRetrieve the value of the send data as json flag.booleanRetrieve the value for throw exception on error.voidsetBasicAuthPassword(String basicAuthPassword) Set the value for the basic authentication password.voidsetBasicAuthUsername(String basicAuthUsername) Set the value for the basic authentication username.voidsetClientKeyAlias(String clientKeyAlias) Set the value for the client certificate alias.voidsetClientKeyStore(String clientKeyStore) Set the value for the client certificate keystore.voidsetCookieStore(CookieStore cookieStore) Set the CookieStore.voidsetHeaders(Headers headers) Set the value for the request headers.voidsetParameters(Parameters params) Set the value for the parameters.voidsetProtocol(String protocol) Set the value for the request protocol.voidsetProxyPassword(String proxyPassword) Set the value for proxy password.voidsetProxyServer(String proxyServer) Set the value for the proxy server.voidsetProxyUsername(String proxyUsername) Set the value for proxy authentication username.voidsetSendDataAsJson(boolean sendDataAsJson) Set the value for the send data as json flag.voidsetSerializedCookieStore(String input) Set the CookieStore by deserializing the input.voidsetThrowExec(boolean throwExec) Set the value for throw exception on error.voidsetTimeout(int timeout) Set the value for the connection timeout in seconds.voidsetTrustStore(String trustStore) Set the value for the HTTPS truststore.voidsetUrlString(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-
-