From b1a661b3ea5a5dd17e1e3e1438f49e2c47eb5751 Mon Sep 17 00:00:00 2001 From: Vedant Seta Date: Fri, 21 Apr 2017 18:40:02 +0530 Subject: [PATCH 1/2] added captureCookies flag documentation in creation new HAR REST API --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8aaa0db58..8816e2345 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ Once that is done, a new proxy will be available on the port returned. All you h Description | HTTP method | Request path | Request parameters --- | :---: | :---: | --- Get a list of ports attached to `ProxyServer` instances managed by `ProxyManager` | GET | */proxy* || -Creates a new HAR 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* |

*captureHeaders* - Boolean, capture headers or not. Optional, default to "false".

*captureContent* - Boolean, capture content bodies or not. Optional, default to "false".

*captureBinaryContent* - Boolean, capture binary content or not. Optional, default to "false".

*initialPageRef* - The string name of The first page ref that should be used in the HAR. Optional, default to "Page 1".

*initialPageTitle* - The title of first HAR page. Optional, default to *initialPageRef*.

+Creates a new HAR 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* |

*captureHeaders* - Boolean, capture headers or not. Optional, default to "false".

*captureCookies* - Boolean, capture cookies or not. Optional, default to "false".

*captureContent* - Boolean, capture content bodies or not. Optional, default to "false".

*captureBinaryContent* - Boolean, capture binary content or not. Optional, default to "false".

*initialPageRef* - The string name of The first page ref that should be used in the HAR. Optional, default to "Page 1".

*initialPageTitle* - The title of first HAR page. Optional, default to *initialPageRef*.

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* |

*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.

*pageTitle* - The title of new HAR page. Optional, default to `pageRef`.

Shuts down the proxy and closes the port. *[port]* in request path it is port where your proxy was started | DELETE | */proxy/[port]* || Returns the JSON/HAR content representing all the HTTP traffic passed through the proxy (provided you have already created the HAR with [this method](#harcreate)) | GET | */proxy/[port]/har* || From a8a4bd5763fe15147a1e0f1eded473507c9e6423 Mon Sep 17 00:00:00 2001 From: Joseph Salomone Date: Mon, 24 Apr 2017 16:39:06 -0700 Subject: [PATCH 2/2] Update README.md I had issues finding "trustAllServers" parameters. I figure other people have this issue as well, so I decided to add the /proxy POST request with its full sets of parameters to this file. You can see the list of input parameters for /proxy in browersmob-rest/src/main/java/net.lightbody.bmp.proxy.bricks.newProxy(...) Full set of System Parameters: http.proxyHost - Deprecated http.proxyPort - Deprecated Full set of HTTP parameters includes: httpProxy - Deprecated proxyUsername proxyPassword bindAddress serverBindAddress port useEcc trustAllServers --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8816e2345..c9973735b 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,7 @@ Once that is done, a new proxy will be available on the port returned. All you h Description | HTTP method | Request path | Request parameters --- | :---: | :---: | --- Get a list of ports attached to `ProxyServer` instances managed by `ProxyManager` | GET | */proxy* || +Creates a new proxy to run requests off of | POST | */proxy* |

*port* - Integer, The specific port to start the proxy service on. Optional, default is generated and returned in response.

*proxyUsername* - String, The username to use to authenticate with the chained proxy. Optional, default to null.

*proxyPassword* - String, The password to use to authenticate with the chained proxy. Optional, default to null.

*bindAddress* - String, If running BrowserMob Proxy in a multi-homed environment, specify a desired bind address. Optional, default to "0.0.0.0".

*serverBindAddress* - String, If running BrowserMob Proxy in a multi-homed environment, specify a desired server bind address. Optional, default to "0.0.0.0".

*useEcc* - Boolean. True, Uses Elliptic Curve Cryptography for certificate impersonation. Optional, default to "false".

*trustAllServers* - Boolean. True, Disables verification of all upstream servers' SSL certificates. All upstream servers will be trusted, even if they do not present valid certificates signed by certification authorities in the JDK's trust store. Optional, default to "false".

| Creates a new HAR 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* |

*captureHeaders* - Boolean, capture headers or not. Optional, default to "false".

*captureCookies* - Boolean, capture cookies or not. Optional, default to "false".

*captureContent* - Boolean, capture content bodies or not. Optional, default to "false".

*captureBinaryContent* - Boolean, capture binary content or not. Optional, default to "false".

*initialPageRef* - The string name of The first page ref that should be used in the HAR. Optional, default to "Page 1".

*initialPageTitle* - The title of first HAR page. Optional, default to *initialPageRef*.

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* |

*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.

*pageTitle* - The title of new HAR page. Optional, default to `pageRef`.

Shuts down the proxy and closes the port. *[port]* in request path it is port where your proxy was started | DELETE | */proxy/[port]* ||