title: Logging all http request with mitmproxy inline script
body: <p>I'm trying to log every http site with mitmproxy but my in-line script is giving this error <strong>TypeError: request() missing 1 required positional argument: 'flow'</strong> Here is a preview of my code. I do have my proxy set up correctly and the httplogs.txt file on the same directory as the in-line script but I don't understand what is wrong in this function.  </p>
  
  <pre><code>import sys
  
  def request(context,flow):
      f = open('httplogs.txt', 'a+')
      f.write(flow.request.url + '\n')
      f.close()
  </code></pre>