public class HarCaptureUtil extends Object
HarCaptureFilter
and HttpConnectHarCaptureFilter
.Modifier and Type | Field and Description |
---|---|
static String |
HTTP_REASON_PHRASE_FOR_FAILURE
The HTTP status text/reason phrase in the
HarResponse for failed requests. |
static int |
HTTP_STATUS_CODE_FOR_FAILURE
The HTTP status code in the
HarResponse for failed requests. |
static String |
HTTP_VERSION_STRING_FOR_FAILURE
The HTTP version string in the
HarResponse for failed requests. |
Constructor and Description |
---|
HarCaptureUtil() |
Modifier and Type | Method and Description |
---|---|
static HarResponse |
createHarResponseForFailure()
Creates a HarResponse object for failed requests.
|
static String |
getConnectionFailedErrorMessage()
Returns the error message for the HAR response when the connection fails.
|
static String |
getNoResponseReceivedErrorMessage()
Returns the error message for the HAR response when no response was received from the server (e.g.
|
static String |
getResolutionFailedErrorMessage(String hostAndPort)
Returns the error message for the HAR response when DNS resolution fails.
|
static String |
getResponseTimedOutErrorMessage()
Returns the error message for the HAR response when the response from the server times out.
|
public static final String HTTP_VERSION_STRING_FOR_FAILURE
HarResponse
for failed requests.public static final int HTTP_STATUS_CODE_FOR_FAILURE
HarResponse
for failed requests.public static final String HTTP_REASON_PHRASE_FOR_FAILURE
HarResponse
for failed requests.public static HarResponse createHarResponseForFailure()
public static String getResolutionFailedErrorMessage(String hostAndPort)
hostAndPort
- the host and port of the address lookup that failedpublic static String getConnectionFailedErrorMessage()
public static String getResponseTimedOutErrorMessage()
public static String getNoResponseReceivedErrorMessage()
Copyright © 2017. All rights reserved.