[api] emit a headers event before we proxy the request with the requests headers