docs: def http_context(self, worker_ctx):
          """ Attempt to extract HTTP context if an HTTP entrypoint was used.
          """
          http = {}
          if isinstance(worker_ctx.entrypoint, HttpRequestHandler):
              try:
                  request = worker_ctx.args[0]
                  try:
                      if request.mimetype == 'application/json':
                          data = request.data
                      else:
                          data = request.form
                  except ClientDisconnected:
                      data = {}
  
                  urlparts = urlsplit(request.url)
                  http.update({
                      'url': '{}://{}{}'.format(
                          urlparts.scheme, urlparts.netloc, urlparts.path
                      ),
                      'query_string': urlparts.query,
                      'method': request.method,
                      'data': data,
                      'headers': dict(get_headers(request.environ)),
                      'env': dict(get_environ(request.environ)),
                  })
              except:
                  pass  # probably not a compatible entrypoint
  
          self.client.http_context(http)