You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get a list of ports attached to `ProxyServer` instances managed by `ProxyManager` | GET | */proxy* ||
133
+
Get a list of ports attached to `ProxyServer` instances managed by `ProxyManager` | GET | */proxy* ||
134
134
<aname="harcreate">Creates a new HAR</a> attached to the proxy and returns the HAR content if there was a previous HAR. *[port]* in request path it is port where your proxy was started | PUT |*/proxy/[port]/har* |<p>*captureHeaders* - Boolean, capture headers or not. Optional, default to "false".</p><p>*captureContent* - Boolean, capture content bodies or not. Optional, default to "false".</p><p>*captureBinaryContent* - Boolean, capture binary content or not. Optional, default to "false".</p><p>*initialPageRef* - The string name of The first page ref that should be used in the HAR. Optional, default to "Page 1".</p><p>*initialPageTitle* - The title of first HAR page. Optional, default to *initialPageRef*.</p>
135
135
Starts a new page on the existing HAR. *[port]* in request path it is port where your proxy was started | PUT | */proxy/[port]/har/pageRef* |<p>*pageRef* - The string name of the first page ref that should be used in the HAR. Optional, default to "Page N" where N is the next page number.</p><p>*pageTitle* - The title of new HAR page. Optional, default to `pageRef`.</p>
136
136
Shuts down the proxy and closes the port. *[port]* in request path it is port where your proxy was started | DELETE | */proxy/[port]* ||
@@ -153,11 +153,11 @@ Removes all URL redirection rules currently in effect | DELETE | */proxy/[port]/
153
153
Setting the retry count | PUT | */proxy/[port]/retry* |<p>*retrycount* - The number of times a method will be retried.</p>|
154
154
Empties the DNS cache | DELETE | */proxy/[port]/dns/cache* ||
155
155
|[REST API interceptors with LittleProxy](#interceptorsRESTapiLP)|||
156
-
|Describe your own request interception | POST |*/proxy/[port]/filter/request*| A string wich determinates interceptor rules. See more [here](#interceptorsRESTapiLPRequestFilter)|
157
-
|Describe your own response interception | POST |*/proxy/[port]/filter/response*| A string wich determinates interceptor rules. See more [here](#interceptorsRESTapiLPResponseFilter)|
156
+
|Describe your own request interception | POST |*/proxy/[port]/filter/request*| A string which determinates interceptor rules. See more [here](#interceptorsRESTapiLPRequestFilter)|
157
+
|Describe your own response interception | POST |*/proxy/[port]/filter/response*| A string which determinates interceptor rules. See more [here](#interceptorsRESTapiLPResponseFilter)|
158
158
|[REST API with Legacy interceptors](#interceptorsRESTapiLegacy)||||
159
-
|Describe your own request interception | POST |*/proxy/[port]/interceptor/request*| A string wich determinates interceptor rules. See more [here](#interceptorsRESTapiLegacy)|
160
-
|Describe your own response interception | POST |*/proxy/[port]/interceptor/response*| A string wich determinates interceptor rules. See more [here](#interceptorsRESTapiLegacy)|
159
+
|Describe your own request interception | POST |*/proxy/[port]/interceptor/request*| A string which determinates interceptor rules. See more [here](#interceptorsRESTapiLegacy)|
160
+
|Describe your own response interception | POST |*/proxy/[port]/interceptor/response*| A string which determinates interceptor rules. See more [here](#interceptorsRESTapiLegacy)|
161
161
162
162
For example, once you've started the proxy you can create a new HAR to start recording data like so:
163
163
@@ -291,7 +291,7 @@ For most use cases, including inspecting and modifying requests/responses, `addR
291
291
returnnull;
292
292
}
293
293
});
294
-
294
+
295
295
// responses are equally as simple:
296
296
proxy.addResponseFilter(newResponseFilter() {
297
297
@Override
@@ -356,7 +356,7 @@ If you are using the legacy ProxyServer implementation, you can manipulate the r
356
356
<aname="interceptorsRESTapiLegacy"></a>You can also POST a JavaScript payload to `/:port/interceptor/request` and `/:port/interceptor/response` using the REST interface. The functions will have a `request`/`response` variable, respectively, and a `har` variable (which may be null if a HAR isn't set up yet). The JavaScript code will be run by [Rhino](https://github.com/mozilla/rhino) and have access to the same Java API in the example above:
357
357
358
358
[~]$ curl -X POST -H 'Content-Type: text/plain' -d 'request.getMethod().removeHeaders("User-Agent");' http://localhost:8080/proxy/8081/interceptor/request
359
-
359
+
360
360
Consult the Java API docs for more info.
361
361
362
362
### SSL Support
@@ -386,7 +386,7 @@ The BrowserMobProxyServer implementation uses native DNS resolution by default,
386
386
You'll need maven (`brew install maven` if you're on OS X):
387
387
388
388
[~]$ mvn -DskipTests
389
-
389
+
390
390
You'll find the standalone BrowserMob Proxy distributable zip at `browsermob-dist/target/browsermob-proxy-2.1.5-SNAPSHOT-bin.zip`. Unzip the contents and run the `browsermob-proxy` or `browsermob-proxy.bat` files in the `bin` directory.
391
391
392
392
When you build the latest code from source, you'll have access to the latest snapshot release. To use the SNAPSHOT version in your code, modify the version in your pom:
0 commit comments