Class RequestParameters
- java.lang.Object
-
- com.ibm.security.access.httpclient.RequestParameters
-
public class RequestParameters extends java.lang.Object
This class stores the parameter values for a HTTP request.
-
-
Constructor Summary
Constructors Constructor Description RequestParameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getBasicAuthPassword()
Retrieve the value for the basic authentication password.java.lang.String
getBasicAuthUsername()
Retrieve the value for the basic authentication username.java.lang.String
getClientKeyAlias()
Retrieve the value for the client certificate alias.java.lang.String
getClientKeyStore()
Retrieve the value for the client certificate keystore.Headers
getHeaders()
Retrieve the value for the request headers.Parameters
getParameters()
Retrieve the value for the parameters.java.lang.String
getProtocol()
Retrieve the value for the request protocol.java.lang.String
getProxyServer()
Retrieve the value for the proxy server.int
getTimeout()
Retrieve the value for the connection timeout in milliseconds.java.lang.String
getTrustStore()
Retrieve the value for the HTTPS truststore.java.lang.String
getUrlString()
Retrieve the value for the URL String.boolean
isSendDataAsJson()
Retrieve the value of the send data as json flag.boolean
isThrowExec()
Retrieve the value for throw exception on error.void
setBasicAuthPassword(java.lang.String basicAuthPassword)
Set the value for the basic authentication password.void
setBasicAuthUsername(java.lang.String basicAuthUsername)
Set the value for the basic authentication username.void
setClientKeyAlias(java.lang.String clientKeyAlias)
Set the value for the client certificate alias.void
setClientKeyStore(java.lang.String clientKeyStore)
Set the value for the client certificate keystore.void
setHeaders(Headers headers)
Set the value for the request headers.void
setParameters(Parameters params)
Set the value for the parameters.void
setProtocol(java.lang.String protocol)
Set the value for the request protocol.void
setProxyServer(java.lang.String proxyServer)
Set the value for the proxy server.void
setSendDataAsJson(boolean sendDataAsJson)
Set the value for the send data as json flag.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(java.lang.String trustStore)
Set the value for the HTTPS truststore.void
setUrlString(java.lang.String urlString)
Set the value for the URL String.
-
-
-
Method Detail
-
getUrlString
public java.lang.String getUrlString()
Retrieve the value for the URL String.- Returns:
- String
-
setUrlString
public void setUrlString(java.lang.String urlString)
Set the value for the URL String. This is a mandatory parameter.- Parameters:
urlString
-
-
getHeaders
public Headers getHeaders()
Retrieve the value for the request headers.- Returns:
- Headers
-
setHeaders
public void setHeaders(Headers headers)
Set the value for the request headers.- Parameters:
headers
-
-
getTrustStore
public java.lang.String getTrustStore()
Retrieve the value for the HTTPS truststore.- Returns:
- String
-
setTrustStore
public void setTrustStore(java.lang.String trustStore)
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
public java.lang.String getBasicAuthUsername()
Retrieve the value for the basic authentication username.- Returns:
- String
-
setBasicAuthUsername
public void setBasicAuthUsername(java.lang.String basicAuthUsername)
Set the value for the basic authentication username. If not set, basic-auth will be disabled.- Parameters:
basicAuthUsername
-
-
getBasicAuthPassword
public java.lang.String getBasicAuthPassword()
Retrieve the value for the basic authentication password.- Returns:
- String
-
setBasicAuthPassword
public void setBasicAuthPassword(java.lang.String basicAuthPassword)
Set the value for the basic authentication password. If not set, basic-auth will be disabled.- Parameters:
basicAuthPassword
-
-
getClientKeyStore
public java.lang.String getClientKeyStore()
Retrieve the value for the client certificate keystore.- Returns:
- String
-
setClientKeyStore
public void setClientKeyStore(java.lang.String clientKeyStore)
Set the value for the client certificate keystore. If not set, client certificate authentication will be disabled.- Parameters:
clientKeyStore
-
-
getClientKeyAlias
public java.lang.String getClientKeyAlias()
Retrieve the value for the client certificate alias.- Returns:
- String
-
setClientKeyAlias
public void setClientKeyAlias(java.lang.String clientKeyAlias)
Set the value for the client certificate alias. If not set, client certificate authentication will be disabled.- Parameters:
clientKeyAlias
-
-
getProtocol
public java.lang.String getProtocol()
Retrieve the value for the request protocol.- Returns:
- String
-
setProtocol
public void setProtocol(java.lang.String protocol)
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
public java.lang.String getProxyServer()
Retrieve the value for the proxy server. Example: https://myproxy.com:443- Returns:
- String
-
setProxyServer
public void setProxyServer(java.lang.String proxyServer)
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
-
-
getParameters
public Parameters getParameters()
Retrieve the value for the parameters.- Returns:
- Parameters
-
setParameters
public void setParameters(Parameters params)
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
-
-
-