Class ApiHelper
java.lang.Object
net.bugreaper.modules.api.internal.ApiHelper
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected io.restassured.http.ContentTypeDefault content type JSONprotected booleanprotected org.slf4j.Loggerprotected longDefault response timeout (not brake request, only assert)protected intDefault connection and socket timeout for http connectionprotected Stringprotected intprotected ThreadLocal<LinkedHashMap<String,Object>> protected ThreadLocal<LinkedHashMap<String,Object>> protected Stringprotected booleanprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.restassured.specification.RequestSpecificationio.restassured.specification.RequestSpecificationgetConfigSummary(Class<?> clazz) Returns the configured HTTP client parameters and logs them.setBasicAuth(String username, String password) setBearerAuth(String token) setContentType(io.restassured.http.ContentType contentType) setHeaders(Map<String, Object> headers) setLogging(boolean enable) setMaxResponseMsAssert(int maxResponseMs) setQueryParams(Map<String, Object> queryParams) setTimeoutMs(int maxTimeoutMs) withHeader(String key, Object value) withHeaders(Map<String, Object> headers) withQueryParam(String key, Object value) withQueryParams(Map<String, Object> queryParams)
-
Field Details
-
logger
protected org.slf4j.Logger logger -
url
-
port
protected int port -
useBasicAuth
protected volatile boolean useBasicAuth -
authToken
-
username
-
password
-
enableLogging
protected volatile boolean enableLogging -
headers
-
queryParams
-
requestQueryParams
-
requestHeaders
-
maxResponseMsAssert
protected volatile long maxResponseMsAssertDefault response timeout (not brake request, only assert) -
maxTimeoutMs
protected volatile int maxTimeoutMsDefault connection and socket timeout for http connection -
contentType
protected volatile io.restassured.http.ContentType contentTypeDefault content type JSON
-
-
Constructor Details
-
ApiHelper
public ApiHelper(String url, int port, net.bugreaper.core.config.ConfigMap options, org.slf4j.Logger logger) -
ApiHelper
-
-
Method Details
-
getHttpClientParams
Returns the configured HTTP client parameters and logs them.- Returns:
- HTTP client parameters formatted as
key=valuepairs, separated by the system line separator
-
setLogging
-
setContentType
-
setMaxResponseMsAssert
-
setTimeoutMs
-
setBearerAuth
-
setBasicAuth
-
setNoAuth
-
setHeaders
-
setHeader
-
cleanSetHeaders
-
withHeader
-
withHeaders
-
setQueryParams
-
cleanSetQueryParams
-
withQueryParam
-
withQueryParams
-
getLogging
-
getConfigSummary
-
buildRequest
public io.restassured.specification.RequestSpecification buildRequest() -
buildSimpleRequest
public io.restassured.specification.RequestSpecification buildSimpleRequest()
-