org.browsermob.proxy.http
Class BrowserMobHttpClient
java.lang.Object
org.browsermob.proxy.http.BrowserMobHttpClient
public class BrowserMobHttpClient
- extends Object
|
Method Summary |
void |
abortActiveRequests()
|
void |
addRequestInterceptor(org.apache.http.HttpRequestInterceptor i)
|
void |
addResponseInterceptor(org.apache.http.HttpResponseInterceptor i)
|
void |
autoBasicAuthorization(String domain,
String username,
String password)
|
void |
autoNTLMAuthorization(String domain,
String username,
String password)
|
void |
blacklistRequest(String pattern,
int responseCode)
|
void |
blacklistRequests(String pattern,
int responseCode)
|
void |
checkTimeout()
|
void |
clearCookies()
|
void |
clearDNSCache()
|
static long |
copyWithStats(InputStream is,
OutputStream os)
|
void |
createCookie(String name,
String value,
String domain)
|
void |
createCookie(String name,
String value,
String domain,
String path)
|
BrowserMobHttpResponse |
execute(BrowserMobHttpRequest req)
|
org.apache.http.cookie.Cookie |
getCookie(String name)
|
org.apache.http.cookie.Cookie |
getCookie(String name,
String domain)
|
org.apache.http.cookie.Cookie |
getCookie(String name,
String domain,
String path)
|
Har |
getHar()
|
boolean |
isFollowRedirects()
|
BrowserMobHttpRequest |
newDelete(String url)
|
BrowserMobHttpRequest |
newGet(String url)
|
BrowserMobHttpRequest |
newHead(String url)
|
BrowserMobHttpRequest |
newOptions(String url)
|
BrowserMobHttpRequest |
newPost(String url)
|
BrowserMobHttpRequest |
newPut(String url)
|
List<String> |
originalHosts(String host)
|
void |
prepareForBrowser()
|
void |
remapHost(String source,
String target)
|
String |
remappedHost(String host)
|
void |
rewriteUrl(String match,
String replace)
|
void |
setCaptureContent(boolean captureContent)
|
void |
setCaptureHeaders(boolean captureHeaders)
|
void |
setConnectionTimeout(int connectionTimeout)
|
void |
setDNSCacheTimeout(int timeout)
|
void |
setDownstreamKbps(long downstreamKbps)
|
void |
setFollowRedirects(boolean followRedirects)
|
void |
setHar(Har har)
|
void |
setHarPageRef(String harPageRef)
|
void |
setLatency(long latency)
|
void |
setRequestTimeout(int requestTimeout)
|
void |
setRetryCount(int count)
|
void |
setSocketOperationTimeout(int readTimeout)
|
void |
setUpstreamKbps(long upstreamKbps)
|
void |
shutdown()
|
void |
whitelistRequests(String[] patterns,
int responseCode)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BrowserMobHttpClient
public BrowserMobHttpClient()
setRetryCount
public void setRetryCount(int count)
remapHost
public void remapHost(String source,
String target)
addRequestInterceptor
public void addRequestInterceptor(org.apache.http.HttpRequestInterceptor i)
addResponseInterceptor
public void addResponseInterceptor(org.apache.http.HttpResponseInterceptor i)
createCookie
public void createCookie(String name,
String value,
String domain)
createCookie
public void createCookie(String name,
String value,
String domain,
String path)
clearCookies
public void clearCookies()
getCookie
public org.apache.http.cookie.Cookie getCookie(String name)
getCookie
public org.apache.http.cookie.Cookie getCookie(String name,
String domain)
getCookie
public org.apache.http.cookie.Cookie getCookie(String name,
String domain,
String path)
newPost
public BrowserMobHttpRequest newPost(String url)
newGet
public BrowserMobHttpRequest newGet(String url)
newPut
public BrowserMobHttpRequest newPut(String url)
newDelete
public BrowserMobHttpRequest newDelete(String url)
newOptions
public BrowserMobHttpRequest newOptions(String url)
newHead
public BrowserMobHttpRequest newHead(String url)
checkTimeout
public void checkTimeout()
execute
public BrowserMobHttpResponse execute(BrowserMobHttpRequest req)
shutdown
public void shutdown()
abortActiveRequests
public void abortActiveRequests()
setHar
public void setHar(Har har)
setHarPageRef
public void setHarPageRef(String harPageRef)
setDownstreamKbps
public void setDownstreamKbps(long downstreamKbps)
setUpstreamKbps
public void setUpstreamKbps(long upstreamKbps)
setLatency
public void setLatency(long latency)
setRequestTimeout
public void setRequestTimeout(int requestTimeout)
setSocketOperationTimeout
public void setSocketOperationTimeout(int readTimeout)
setConnectionTimeout
public void setConnectionTimeout(int connectionTimeout)
setFollowRedirects
public void setFollowRedirects(boolean followRedirects)
isFollowRedirects
public boolean isFollowRedirects()
autoBasicAuthorization
public void autoBasicAuthorization(String domain,
String username,
String password)
autoNTLMAuthorization
public void autoNTLMAuthorization(String domain,
String username,
String password)
rewriteUrl
public void rewriteUrl(String match,
String replace)
blacklistRequest
public void blacklistRequest(String pattern,
int responseCode)
blacklistRequests
public void blacklistRequests(String pattern,
int responseCode)
whitelistRequests
public void whitelistRequests(String[] patterns,
int responseCode)
prepareForBrowser
public void prepareForBrowser()
remappedHost
public String remappedHost(String host)
originalHosts
public List<String> originalHosts(String host)
getHar
public Har getHar()
setCaptureHeaders
public void setCaptureHeaders(boolean captureHeaders)
setCaptureContent
public void setCaptureContent(boolean captureContent)
clearDNSCache
public void clearDNSCache()
setDNSCacheTimeout
public void setDNSCacheTimeout(int timeout)
copyWithStats
public static long copyWithStats(InputStream is,
OutputStream os)
throws IOException
- Throws:
IOException
Copyright © 2011. All Rights Reserved.