public class CurlHttpClient extends AbstractScrapingHttpClient
GLOBAL_REQUESTS_THREAD_LOCK, session
REDIRECT_WITH_POST_ENTITY_STATUS_CODE
Constructor and Description |
---|
CurlHttpClient(ScrapingSession session) |
Modifier and Type | Method and Description |
---|---|
void |
clearCookies()
Clears all cookies from this client
|
void |
close() |
java.util.List<ScrapingCookie> |
getCookies()
Returns a list of all the cookies for the current client, for any domain
|
protected ScrapingResponse |
issueRequestInternal(ScrapingRequest request)
Issues the given request.
|
void |
setCookie(ScrapingCookie cookie)
Sets the cookie
|
void |
updateSessionClientInfo()
Tells the client the session http info value has changed.
|
boolean |
usesHint(ScrapingHint hint)
Returns whether or not this client implementation uses the given hint.
|
convertScrapeableFileToRequest, getProxy, isRedirectStatusCode, issueRequest, logDebug, logDebug, logError, logError, logInfo, logInfo, logWarn, logWarn, scrapeFile, setProxyServer
public CurlHttpClient(@Nullable ScrapingSession session)
@NotNull protected ScrapingResponse issueRequestInternal(@NotNull ScrapingRequest request)
AbstractScrapingHttpClient
issueRequestInternal
in class AbstractScrapingHttpClient
request
- The request to be issuedpublic void setCookie(@NotNull ScrapingCookie cookie)
ScrapingHttpClient
cookie
- The cookie to setpublic void clearCookies()
ScrapingHttpClient
public boolean usesHint(@NotNull ScrapingHint hint)
ScrapingHttpClient
hint
- The hint to test@NotNull public java.util.List<ScrapingCookie> getCookies()
ScrapingHttpClient
public void close()
public void updateSessionClientInfo()
ScrapingHttpClient