public class ScrapingRequest
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ScrapingRequest.Builder |
static class |
ScrapingRequest.Type
The types of requests that can be issued
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getActualEntity()
Returns the actual request entity that was sent, or null if it wasn't set by the client that sent the request
|
java.net.URL |
getActualRequestURL()
Gets the actual URL that was requested, or null if the client never updated it or the request hasn't been issued yet
|
java.lang.String |
getBasicAuthenticationPassword()
Returns the BasicAuthenticationPassword for the object
|
java.lang.String |
getBasicAuthenticationUsername()
Returns the BasicAuthenticationUsername for the object
|
java.lang.String |
getBasicNtlmAuthenticationDomain()
Returns the BasicNtlmAuthenticationDomain for the object
|
java.lang.String |
getBasicNtlmAuthenticationHost()
Returns the BasicNtlmAuthenticationHost for the object
|
java.lang.String |
getCharacterEncoding()
Returns the CharacterEncoding for the object
|
java.lang.String |
getEntity()
Returns the Entity for the object
|
java.util.List<RequestParameter> |
getGetParameters()
Returns the GetParameters for the object.
|
java.util.Set<ScrapingHttpHeader> |
getHeaders()
Returns the Headers for the object.
|
java.util.Set<ScrapingHttpHeader> |
getInferredHeaders()
Returns the Inferred Headers for the object.
|
java.lang.String |
getLoggableName()
Returns the LoggableName for the object
|
int |
getMaxResponseLength()
Returns the MaxResponseLength for the object
|
java.io.OutputStream |
getOutputStream()
Returns the OutputStream for the object (when set output should be written here instead of to the response)
|
java.util.List<RequestParameter> |
getPostParameters()
Returns the PostParameters for the object.
|
java.util.Set<ScrapingHint> |
getRequestHints()
Returns the RequestHints for the object
|
ScrapingRequest.Type |
getType()
Returns the Type for the object
|
java.lang.String |
getUrl()
Returns the Url for the object
|
boolean |
hasHint(ScrapingHint hint)
Returns if the request has the given hint or not
|
boolean |
isMultipart()
Returns if this is a multipart request
|
void |
setActualEntity(java.lang.String actualEntity)
Sets the actual entity that was sent
|
void |
setActualRequestString(java.lang.String requestString)
Sets the request string used (this includes headers, entity, etc...).
|
void |
setActualRequestURL(java.net.URL actualRequestURL)
Sets the actual URL that was requested
|
java.lang.String |
toSentRequestString() |
java.lang.String |
toString() |
@NotNull public java.lang.String getUrl()
@Nullable public java.lang.String getBasicAuthenticationUsername()
@Nullable public java.lang.String getBasicAuthenticationPassword()
@Nullable public java.lang.String getBasicNtlmAuthenticationDomain()
@Nullable public java.lang.String getBasicNtlmAuthenticationHost()
@NotNull public java.util.List<RequestParameter> getGetParameters()
@NotNull public java.util.List<RequestParameter> getPostParameters()
@Nullable public java.lang.String getEntity()
@NotNull public java.util.Set<ScrapingHttpHeader> getHeaders()
@NotNull public java.util.Set<ScrapingHttpHeader> getInferredHeaders()
An inferred header is one screen-scraper decided to add by looking at parameters and entities. Some clients may handle this on their own, so won't need the inferred values
@NotNull public ScrapingRequest.Type getType()
public java.io.OutputStream getOutputStream()
public boolean isMultipart()
public int getMaxResponseLength()
@NotNull public java.util.Set<ScrapingHint> getRequestHints()
public boolean hasHint(@NotNull ScrapingHint hint)
hint
- The hint in question@NotNull public java.lang.String getLoggableName()
public java.lang.String toString()
toString
in class java.lang.Object
@NotNull public java.lang.String getCharacterEncoding()
public void setActualRequestString(@NotNull java.lang.String requestString)
requestString
- The actual request sent (or that would be sent)@Nullable public java.lang.String getActualEntity()
public void setActualEntity(@NotNull java.lang.String actualEntity)
actualEntity
- The actual entity that was sent@Nullable public java.net.URL getActualRequestURL()
public void setActualRequestURL(@Nullable java.net.URL actualRequestURL)
actualRequestURL
- The actual URL that was requested, or null if it couldn't be determined@NotNull public java.lang.String toSentRequestString()