martian icon indicating copy to clipboard operation
martian copied to clipboard

New Modifier: har.Logger

Open caccialdo opened this issue 7 years ago • 1 comments

Would allow customising the har logger via the REST API and leverage the existing bodyLogging and postDataLogging options currently only accessible when martian is used as a library.

{
  "har.Logger": {
    "scope": ["request", "response"],
    "bodyLogging": false,
    "postDataLogging": false
  }
}

Use case: avoid transmitting heavy request/response bodies when they are not necessary for what's being tested. For e.g. when testing the HAR logs in a separate process that communicates with martian over the REST api.

caccialdo avatar Jul 18 '18 22:07 caccialdo

To add a bit more context, this new modifier would bring Martian on par with Browsermob-proxy where the user can toggle the captureHeaders, captureCookies, captureContent and captureBinaryContent flags when requesting the creation of a new proxy.

Cf. https://github.com/lightbody/browsermob-proxy/blob/master/README.md#rest-api

caccialdo avatar Jul 19 '18 08:07 caccialdo