object WebHandler
- Annotations
- @ApiMayChange()
- Source
- WebHandler.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- WebHandler
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- def defaultCorsSettings(as: ClassicActorSystemProvider): CorsSettings
Default CORS settings to use for grpc-web
- def grpcWebHandler(handlers: PartialFunction[HttpRequest, Future[HttpResponse]]*)(implicit as: ClassicActorSystemProvider): (HttpRequest) => Future[HttpResponse]
Creates a
HttpRequest
toHttpResponse
handler for gRPC services that can be used in for exampleHttp().bindAndHandleAsync
for the generated partial function handlers:Creates a
HttpRequest
toHttpResponse
handler for gRPC services that can be used in for exampleHttp().bindAndHandleAsync
for the generated partial function handlers:- The generated handler supports the
application/grpc-web
andapplication/grpc-web-text
media types. - CORS is implemented for handled servives, including pre-flight requests and request enforcement.
- If the request is for a handled service, is not a CORS pre-flight request, and has an invalid media type, then a _415: Unsupported Media Type_ response is produced.
- Otherise if the request is not handled by one of the provided handlers, a _404: Not Found_ response is produced.
- The generated handler supports the