public class ScrapingResponse
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ScrapingResponse.Builder |
static class |
ScrapingResponse.SynchronizedBuilder |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBody()
Returns the Body for the object, as it was received.
|
java.lang.String |
getBodyWithBinaryCheck(boolean forceNonBinary)
Returns the Body for the object, checking for binary types, and when found, returning a "binary data" string instead of garbage text
|
java.lang.String |
getCharacterEncoding()
Returns the CharacterEncoding for the object
|
RequestError |
getError()
Returns the Error for the object
|
java.lang.String |
getFinalUrl()
Returns the FinalUrl for the object
|
java.util.Set<ScrapingHttpHeader> |
getHeaders()
Returns the Headers for the object
|
java.lang.String |
getHeaderSectionString() |
byte[] |
getRawResponse()
Returns the RawResponse for the object
|
java.util.List<java.lang.String> |
getRedirectUrls()
Returns the RedirectUrls for the object
|
int |
getStatusCode()
Returns the StatusCode for the object
|
java.lang.String |
getStatusLine()
Returns the StatusLine for the object
|
java.lang.String |
toFullResponseString()
Returns the body string for display (includes the headers).
|
java.lang.String |
toFullResponseString(boolean forceNonBinary)
Returns the body string for display (includes the headers)
|
boolean |
wasErrorOnRequest()
Returns the ErrorOnRequest for the object
|
@Nullable public RequestError getError()
@NotNull public java.lang.String getCharacterEncoding()
@NotNull public java.util.List<java.lang.String> getRedirectUrls()
@NotNull public java.lang.String getFinalUrl()
public int getStatusCode()
@NotNull public java.lang.String getStatusLine()
@NotNull public java.util.Set<ScrapingHttpHeader> getHeaders()
@NotNull public java.lang.String getBody()
@NotNull public java.lang.String getBodyWithBinaryCheck(boolean forceNonBinary)
forceNonBinary
- True to force this to be treated as non binary, false to let the code try to determine if it is binary or notpublic boolean wasErrorOnRequest()
@NotNull public byte[] getRawResponse()
@NotNull public java.lang.String getHeaderSectionString()
@NotNull public java.lang.String toFullResponseString()
@NotNull public java.lang.String toFullResponseString(boolean forceNonBinary)
forceNonBinary
- True if we should display the body as non binary regardless, false to try and hide binary data