WebHandler
org.apache.pekko.grpc.javadsl.WebHandler
@ApiMayChange
object WebHandler
Attributes
- Source
- WebHandler.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
WebHandler.type
Members list
Value members
Concrete methods
def grpcWebHandler(handlers: List[Function[HttpRequest, CompletionStage[HttpResponse]]], as: ClassicActorSystemProvider, mat: Materializer): Function[HttpRequest, CompletionStage[HttpResponse]]
Creates a HttpRequest to HttpResponse handler for gRPC services that can be used in for example Http().bindAndHandleAsync for the generated partial function handlers:
Creates a HttpRequest to HttpResponse handler for gRPC services that can be used in for example Http().bindAndHandleAsync for the generated partial function handlers:
- The generated handler supports the
application/grpc-webandapplication/grpc-web-textmedia types. - CORS is implemented for handled services, including pre-flight requests and request enforcement.
- If the request s not a CORS pre-flight request, and has an invalid media type, then a 415: Unsupported Media Type response is produced.
- Otherwise if the request is not handled by one of the provided handlers, a 404: Not Found response is produced.
Attributes
- Source
- WebHandler.scala
def grpcWebHandler(handlers: List[Function[HttpRequest, CompletionStage[HttpResponse]]], as: ClassicActorSystemProvider, mat: Materializer, corsSettings: CorsSettings): Function[HttpRequest, CompletionStage[HttpResponse]]
Creates a HttpRequest to HttpResponse handler for gRPC services that can be used in for example Http().bind for the generated partial function handlers:
Creates a HttpRequest to HttpResponse handler for gRPC services that can be used in for example Http().bind for the generated partial function handlers:
- The generated handler supports the
application/grpc-webandapplication/grpc-web-textmedia types. - CORS is implemented for handled services, including pre-flight requests and request enforcement.
- If the request s not a CORS pre-flight request, and has an invalid media type, then a 415: Unsupported Media Type response is produced.
- Otherwise if the request is not handled by one of the provided handlers, a 404: Not Found response is produced.
Attributes
- Source
- WebHandler.scala
In this article