AutomatedTester.BrowserMob icon indicating copy to clipboard operation
AutomatedTester.BrowserMob copied to clipboard

captureContent parameter in NewHar() method to capture body content of HTTP requests.

Open masoudk1990 opened this issue 4 years ago • 0 comments

  • Added an optional parameter in NewHar() method to capture body content of HTTP requests.
/// <summary>
/// 
/// </summary>
/// <param name="reference"></param>
/// <param name="captureContent">Whether to capture body content of requests or not</param>
public void NewHar(string reference = null, bool captureContent = false)
{
    MakeRequest(String.Format("{0}/{1}/har" + (captureContent ? "?captureContent=true" : ""), _baseUrlProxy, _port), "PUT", reference);
}
  • When starting the server, if it fails it displays a proper detailed error message.
throw new Exception($"Can not connect to BrowserMob Proxy - {_errorMessage}");

masoudk1990 avatar Jan 18 '21 18:01 masoudk1990