Access HTTP2 headers from a @grpc/grpc-js Handler

Alan Storm

I have a @grpc/grpc-js server. It includes a handler for a method that looks like this

server = new grpc.Server()
server.addService(proto.GrpcTester.service, {
    myMethod(call, callback) {
       callback(null, {hello:"world"})
    }
})

Is there a way to access the HTTP2 request headers that were set when this request was made?

murgatroid99

The call object passed to the myMethod function in that example code has a metadata property that contains the request headers.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Access method from event handler Vue.JS

HTTP2 headers compatibility with older browsers

Read response headers from image error handler

Cannot access HTTP headers from Cloud Endpoints Python

Nextjs ERR_HTTP_HEADERS_SENT in POST handler, from a GET request

Access client IP from handler

Angular 2 & Typescript: Cannot access class instance from event handler

headers with access from domain only

Sending multiple JSON data in HTTP2 from client to server in Node.js

Access headers/queryparams from a WebView from Nativescript

Access state from Event Handler created within React.js UseEffect Hook

Does concatenation reduce the amount of headers in HTTP2?

What is the purpose of http2 pseudo-headers :authority & :method?

How to access PE NT headers from DOS headers?

Access External Object From An Event Handler

Can not access object from event handler in ReactJS

Access control from its event handler

Access request headers from beforeSave Model Hook

Get access to the request headers from Axum IntoResponse

Angular 2 - Get Headers From Http Requests

How to access client hostname, http headers etc from a Java websocket server?

How to access HTTP headers in rails same as apache_request_headers?

Nginx - Access Http custom headers v2

Angular 2: Can't access response headers in a http request

How to access angular $http response custom headers?

Distinguish direct access from internal access in Proxy get handler

Remove HTTP Headers from CURL

How to upgrade Istio Service Mesh from http to http2?

Listen to result from event handler in JS