package http

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. http
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait ChannelConfig extends AnyRef

    Contains only http channel related configurations in HttpClientConfig

  2. trait CompatApi extends AnyRef

    An interface for using different implementation between Scala JVM and Scala.js

  3. class Endpoint extends Annotation with Annotation with ClassfileAnnotation
    Annotations
    @Retention() @Target()
  4. sealed abstract class GrpcStatus extends PackSupport
  5. case class HttpAccessLogConfig(fileName: String = "log/http_access.json", maxFiles: Int = 100, maxSize: Long = 100 * 1024 * 1024) extends Product with Serializable
  6. trait HttpAccessLogWriter extends AutoCloseable

  7. trait HttpBackend[Req, Resp, F[_]] extends AnyRef

    A base interface to implement http-server specific implementation

  8. trait HttpClientBase[F[_], Req, Resp] extends AnyRef

  9. case class HttpClientConfig(name: String = "airframe-http-client", backend: HttpClientBackend = compat.defaultHttpClientBackend, requestFilter: (Request) ⇒ Request = identity, rpcEncoding: RPCEncoding = RPCEncoding.JSON, retryContext: RetryContext = ..., codecFactory: MessageCodecFactory = ..., circuitBreaker: CircuitBreaker = ..., connectTimeout: Duration = Duration(90, TimeUnit.SECONDS), readTimeout: Duration = Duration(90, TimeUnit.SECONDS), executionContextProvider: (HttpClientConfig) ⇒ ExecutionContext = _ => compat.defaultExecutionContext, clientFilter: ClientFilter = ClientFilter.identity, rxConverter: (Future[_]) ⇒ RxStream[_] = ...) extends ChannelConfig with Product with Serializable

  10. class HttpClientException extends Exception

  11. case class HttpClientMaxRetryException(response: HttpResponse[_], retryContext: RetryContext, cause: Throwable) extends HttpClientException with Product with Serializable
  12. trait HttpContext[Req, Resp, F[_]] extends HttpContextBase

    Used for passing the subsequent actions to HttpFilter and for defining the leaf action of request processing chain.

  13. trait HttpContextBase extends AnyRef

    A base type to use classOf[HttpContextBase].

    A base type to use classOf[HttpContextBase]. classOf[HttpContext[_, _, _] is not supported for higherkinded types

  14. trait HttpFilter[Req, Resp, F[_]] extends HttpFilterType

    A filter interface to define actions for handling HTTP requests and responses.

    A filter interface to define actions for handling HTTP requests and responses.

    Implementations of HttpFilter must wrap an exception occurred in the filter.apply(request, context) with F[_]

  15. trait HttpFilterType extends AnyRef
  16. trait HttpMessage[Raw] extends HttpMessageBase[Raw]
  17. trait HttpMessageBase[Raw] extends AnyRef
  18. case class HttpMultiMap(underlying: Map[String, Any] = Map.empty) extends Product with Serializable

    Immutable case-insensitive MultiMap structure for representing Http headers, query parameters, etc.

  19. case class HttpMultiMapEntry(key: String, value: String) extends Product with Serializable
  20. trait HttpRequest[Req] extends AnyRef

    HttpRequest[Req] wraps native request classes (e.g., okhttp's Response, finagle Response, etc.) so that we can implement common logic for various backends.

  21. trait HttpRequestAdapter[Req] extends AnyRef

    A type class to bridge the original requests and backend-specific request types (e.g., finagle, okhttp, etc.)

  22. trait HttpResponse[Resp] extends AnyRef

    HttpResponse[Resp] wraps native response classes (e.g., okhttp's Response, finagle Response, etc.) so that we can implement common logic for various backends.

  23. trait HttpResponseAdapter[Resp] extends AnyRef

    A type class to bridge the original response type and HttpResponse

  24. class HttpResponseBodyCodec[Resp] extends MessageCodec[HttpResponse[_]]

  25. class HttpServerException extends Exception with HttpServerExceptionBase

    Exception to report errors to client

  26. trait HttpServerExceptionBase extends AnyRef

  27. class HttpStatus extends PackSupport
  28. trait HttpSyncClient[Req, Resp] extends HttpSyncClientBase[Req, Resp] with AutoCloseable

    A synchronous HTTP Client interface

  29. class HttpSyncClientAdapter[F[_], Req, Resp] extends HttpSyncClientAdapterBase[F, Req, Resp]

    A synchronous HttpClient that awaits responses.

  30. abstract class HttpSyncClientAdapterBase[F[_], Req, Resp] extends HttpSyncClient[Req, Resp]
  31. trait HttpSyncClientBase[Req, Resp] extends AnyRef
  32. class RPC extends Annotation with Annotation with ClassfileAnnotation
    Annotations
    @Retention() @Target()
  33. trait RPCContext extends AnyRef
  34. sealed trait RPCEncoding extends AnyRef

  35. case class RPCErrorMessage(code: Int = RPCStatus.UNKNOWN_I1.code, codeName: String = RPCStatus.UNKNOWN_I1.name, message: String = "", stackTrace: Option[Seq[GenericStackTraceElement]] = None, cause: Option[Throwable] = None, appErrorCode: Option[Int] = None, metadata: Map[String, Any] = Map.empty) extends Product with Serializable

    A model class for RPC error message body.

    A model class for RPC error message body. This message will be embedded to HTTP response body or gRPC trailer.

    We need this class to avoid directly serde RPCException classes with airframe-codec, so that we can properly propagate the exact stack trace to the client.

  36. case class RPCException(status: RPCStatus = RPCStatus.INTERNAL_ERROR_I0, message: String = "", cause: Option[Throwable] = None, appErrorCode: Option[Int] = None, metadata: Map[String, Any] = Map.empty) extends Exception with Product with Serializable

    RPCException provides a backend-independent (e.g., Finagle or gRPC) RPC error reporting mechanism.

    RPCException provides a backend-independent (e.g., Finagle or gRPC) RPC error reporting mechanism. Create this exception with (RPCStatus code).toException(...) method.

    If necessary, we can add more standard error_details parameter like https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto

  37. case class RPCMethod(path: String, rpcInterfaceName: String, methodName: String, requestSurface: Surface, responseSurface: Surface) extends Product with Serializable

    RPC endpoint information

  38. sealed abstract class RPCStatus extends PackSupport

    A base class for defining standard RPC error codes

  39. sealed trait RPCStatusType extends PackSupport

    RPC status types

  40. case class Router(surface: Option[Surface] = None, children: Seq[Router] = Seq.empty, localRoutes: Seq[Route] = Seq.empty, filterSurface: Option[Surface] = None, filterInstance: Option[HttpFilterType] = None, controllerInstance: Option[Any] = None) extends RouterBase with LogSupport with Product with Serializable

    Router defines mappings from HTTP requests to Routes.

    Router defines mappings from HTTP requests to Routes.

    Router can be nested

    • Router1 with Filter1
      • Router2: endpoints e1, e2
      • Router3: endpoints e3 with Filter2
    • Router4: endpoints e4

    From this router definition, the backend HTTP server specific implementation will build a mapping table like this: e1 -> Filter1 andThen process(e1) e2 -> Filter1 andThen process(e2) e3 -> Filter1 andThen Filter2 andThen process(e3) e4 -> process(e4)

  41. trait RxHttpBackend extends AnyRef

    Rx-based http server backend interface, which will be used for hiding the server implementation detailes between Netty, Finagle, and gRPC

  42. trait RxHttpEndpoint extends AutoCloseable

    RxHttpEndpoint is a terminal for processing requests and returns Rx[Response].

  43. trait RxHttpFilter extends AnyRef

    An RxHttpFilter is a filter for receiving the response from the endpoint via endpoint.apply(request), and transforming it into another Rx[Response].

  44. trait RxRouteFilterBase extends AnyRef
  45. trait RxRouter extends AnyRef
  46. trait RxRouterObjectBase extends AnyRef
  47. trait RxRouterProvider extends AnyRef

    An interface used for RPC clients (sbt-airframe) to discover the default router for the RPC endpoint.

    An interface used for RPC clients (sbt-airframe) to discover the default router for the RPC endpoint.

    Example usage:

    import wvlet.airframe.http._
    
    @RPC
    trait MyRPC {
      def hello(name:String) : String
    }
    
    object MyRPC extends RxRouterProvider {
      // sbt-airframe will generate an RPC client using this router
      override def router: RxRouter = RxRouter.of[MyRPC]
    }
  48. case class ServerAddress(host: String, port: Int, scheme: String = "http") extends Product with Serializable

    Server address holder

  49. case class StaticContent(resourcePaths: List[ResourceType] = List.empty) extends Product with Serializable
  50. class description extends Annotation with Annotation with ClassfileAnnotation
    Annotations
    @Retention() @Target()
  51. trait HttpClient[F[_], Req, Resp] extends HttpClientBase[F, Req, Resp] with AutoCloseable

    Asynchronous HTTP Client interface

    Asynchronous HTTP Client interface

    F

    An abstraction for Future type (e.g., Resolves the differences between Twitter Future, Scala Future, etc.)

    Annotations
    @deprecated
    Deprecated

    (Since version 24.5.0) Use wvlet.airframe.http.client.Sync/AsyncClient

Value Members

  1. val compat: CompatApi
  2. object BuildInfo extends Product with Serializable

    This object was generated by sbt-buildinfo.

  3. object Compat extends CompatApi

  4. object EmptyRPCContext extends RPCContext

    An empty RPCContext

  5. object GrpcStatus

    gRPC error code definitions in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto

  6. object Http

    An entry point to access airframe-http functionalities

  7. object HttpAccessLogWriter
  8. object HttpBackend
  9. object HttpClient extends LogSupport
  10. object HttpClientConfig extends Serializable
  11. object HttpClientException extends LogSupport

    Common classifiers for HTTP client responses and exceptions in order to retry HTTP requests.

  12. object HttpContext
  13. object HttpFilter
  14. object HttpHeader
  15. object HttpMessage

    Http request/response data type definitions

  16. object HttpMethod
  17. object HttpMultiMap extends Serializable
  18. object HttpMultiMapCodec extends MessageCodec[HttpMultiMap]

  19. object HttpStatus

    HTTP status code collection.

  20. object RPCContext
  21. object RPCEncoding
  22. object RPCException extends Serializable
  23. object RPCStatus

    Define the standard RPC code that can be used for generic RPC service implementation.

    Define the standard RPC code that can be used for generic RPC service implementation.

    This covers all gRPC statuses and have pre-defined mappings to HTTP status (4xx, 5xx) code.

    If you need an application-specific error code, use an additional argument of the RPCError class.

  24. object RPCStatusType
  25. object Router extends RouterObjectBase with LogSupport
  26. object RxHttpFilter
  27. object RxRouter extends RxRouterObjectBase
  28. object ServerAddress extends LogSupport
  29. object StaticContent extends LogSupport

    Helper for returning static contents

Inherited from AnyRef

Inherited from Any

Ungrouped