Creates a request handler for the provided services.
The returned handler auto-detects the HTTP protocol version per request:
BIDI_STREAM
REQUEST_RESPONSE
Set bidirectional: true to force BIDI_STREAM for all requests, or bidirectional: false to force REQUEST_RESPONSE for all requests.
bidirectional: true
bidirectional: false
Configuration options for the endpoint handler.
A request handler function compatible with both HTTP/1.1 and HTTP/2 servers.
const httpServer = http2.createServer(createEndpointHandler({ services: [myService] }));httpServer.listen(port); Copy
const httpServer = http2.createServer(createEndpointHandler({ services: [myService] }));httpServer.listen(port);
const httpServer = http.createServer(createEndpointHandler({ services: [myService] }));httpServer.listen(port); Copy
const httpServer = http.createServer(createEndpointHandler({ services: [myService] }));httpServer.listen(port);
Creates a request handler for the provided services.
The returned handler auto-detects the HTTP protocol version per request:
BIDI_STREAM)REQUEST_RESPONSE) by defaultSet
bidirectional: trueto forceBIDI_STREAMfor all requests, orbidirectional: falseto forceREQUEST_RESPONSEfor all requests.