Package kong.unirest.core
Class RequestSummary
- java.lang.Object
-
- kong.unirest.core.RequestSummary
-
- All Implemented Interfaces:
HttpRequestSummary
class RequestSummary extends java.lang.Object implements HttpRequestSummary
-
-
Field Summary
Fields Modifier and Type Field Description private static SummaryFormatter
FORMATTER
private BaseRequest
request
-
Constructor Summary
Constructors Constructor Description RequestSummary(BaseRequest request)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
asString()
java.util.Collection<Header>
getHeaders()
HttpMethod
getHttpMethod()
java.lang.String
getRawPath()
java.lang.String
getUrl()
-
-
-
Field Detail
-
FORMATTER
private static final SummaryFormatter FORMATTER
-
request
private final BaseRequest request
-
-
Constructor Detail
-
RequestSummary
RequestSummary(BaseRequest request)
-
-
Method Detail
-
getHttpMethod
public HttpMethod getHttpMethod()
- Specified by:
getHttpMethod
in interfaceHttpRequestSummary
- Returns:
- The HTTP method of the request
-
getUrl
public java.lang.String getUrl()
- Specified by:
getUrl
in interfaceHttpRequestSummary
- Returns:
- The current full URL string for the request with query params (http://somewhere/else?colour=red)
-
getRawPath
public java.lang.String getRawPath()
- Specified by:
getRawPath
in interfaceHttpRequestSummary
- Returns:
- The raw un-parameterized path without query strings (http://somewhere/{param})
-
asString
public java.lang.String asString()
- Specified by:
asString
in interfaceHttpRequestSummary
- Returns:
- a string summary of the request suitable for logging
-
getHeaders
public java.util.Collection<Header> getHeaders()
- Specified by:
getHeaders
in interfaceHttpRequestSummary
- Returns:
- an immutable collection of the headers for the request
-
-