wvlet.airframe.http

Attributes

Members list

Concise view

Type members

Classlikes

case object BuildInfo

This object was generated by sbt-buildinfo.

This object was generated by sbt-buildinfo.

Attributes

Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Self type

Contains only http channel related configurations in HttpClientConfig

Contains only http channel related configurations in HttpClientConfig

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Compat extends CompatApi

Attributes

Graph
Supertypes
trait CompatApi
class Object
trait Matchable
class Any
Self type
Compat.type
trait CompatApi

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

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

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Compat.type

An empty RPCContext

An empty RPCContext

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
sealed abstract class GrpcStatus(val code: Int, val httpStatus: HttpStatus) extends PackSupport

Attributes

Companion:
object
Graph
Supertypes
trait PackSupport
class Object
trait Matchable
class Any
Known subtypes
object ABORTED_10.type
object ALREADY_EXISTS_6.type
object CANCELLED_1.type
object DATA_LOSS_15.type
object INTERNAL_13.type
object INVALID_ARGUMENT_3.type
object NOT_FOUND_5.type
object OK_0.type
object OUT_OF_RANGE_11.type
object UNAUTHENTICATED_16.type
object UNAVAILABLE_14.type
object UNIMPLEMENTED_12.type
object UNKNOWN_2.type
object GrpcStatus

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

Attributes

Companion:
class
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
object Http

An entry point to access airframe-http functionalities

An entry point to access airframe-http functionalities

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Http.type
trait HttpBackend[Req, Resp, F[_]]

A base interface to implement http-server specific implementation

A base interface to implement http-server specific implementation

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object DefaultBackend.type
Self type
HttpBackend[Req, Resp, F]

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
trait HttpClient[F[_], Req, Resp] extends HttpClientBase[F, Req, Resp] with AutoCloseable

Asynchronous HTTP Client interface

Asynchronous HTTP Client interface

Attributes

F

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

Companion:
object
Graph
Supertypes
trait AutoCloseable
trait HttpClientBase[F, Req, Resp]
class Object
trait Matchable
class Any
object HttpClient extends LogSupport

Attributes

Companion:
trait
Graph
Supertypes
trait LogSupport
trait LazyLogger
trait LoggingMethods
trait Serializable
class Object
trait Matchable
class Any
Self type
trait HttpClientBase[F[_], Req, Resp]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait HttpClient[F, Req, Resp]

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class HttpClientConfig(backend: HttpClientBackend, requestFilter: Request => Request, rpcEncoding: RPCEncoding, retryContext: RetryContext, codecFactory: MessageCodecFactory, circuitBreaker: CircuitBreaker, connectTimeout: Duration, readTimeout: Duration, executionContextProvider: HttpClientConfig => ExecutionContext, clientFilter: ClientFilter, rxConverter: Future[_] => RxStream[_]) extends ChannelConfig

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
class HttpClientException(val response: HttpResponse[_], val status: HttpStatus, message: String, cause: Throwable) extends Exception

Attributes

Companion:
object
Graph
Supertypes
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Known subtypes
object HttpClientException extends LogSupport

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

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

Attributes

Companion:
class
Graph
Supertypes
trait LogSupport
trait LazyLogger
trait LoggingMethods
trait Serializable
class Object
trait Matchable
class Any
Self type
case class HttpClientMaxRetryException(response: HttpResponse[_], retryContext: RetryContext, cause: Throwable) extends HttpClientException

Attributes

Graph
Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
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.

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

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Context

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

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

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

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait HttpContext[Req, Resp, F]
class Context
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[_]

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Filter
Self type
HttpFilter[Req, Resp, F]
object HttpFilter

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait HttpFilter[Req, Resp, F]
class Filter
object HttpHeader

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
trait HttpMessage[Raw] extends HttpMessageBase[Raw]

Attributes

Companion:
object
Graph
Supertypes
trait HttpMessageBase[Raw]
class Object
trait Matchable
class Any
Known subtypes
class Request
class Response

Http request/response data type definitions

Http request/response data type definitions

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
trait HttpMessageBase[Raw]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait HttpMessage[Raw]
class Request
class Response
object HttpMethod

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class HttpMultiMap(underlying: Map[String, Any])

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

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

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
object HttpMultiMapCodec extends MessageCodec[HttpMultiMap]

Attributes

Graph
Supertypes
trait MessageCodec[HttpMultiMap]
trait LogSupport
trait LazyLogger
trait LoggingMethods
trait Serializable
class Object
trait Matchable
class Any
Self type
case class HttpMultiMapEntry(key: String, value: String)

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
trait HttpRequest[Req]

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

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

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

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

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

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait HttpResponse[Resp]

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

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

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

A type class to bridge the original response type and HttpResponse

A type class to bridge the original response type and HttpResponse

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class HttpResponseBodyCodec[Resp] extends MessageCodec[HttpResponse[_]]

Attributes

Graph
Supertypes
trait MessageCodec[HttpResponse[_]]
trait LogSupport
trait LazyLogger
trait LoggingMethods
trait Serializable
class Object
trait Matchable
class Any
class HttpServerException(val status: HttpStatus, msg: String, cause: Throwable) extends Exception with HttpServerExceptionBase

Exception to report errors to client

Exception to report errors to client

Attributes

Graph
Supertypes
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class HttpStatus(val code: Int) extends PackSupport

Attributes

Companion:
object
Graph
Supertypes
trait PackSupport
class Object
trait Matchable
class Any
Known subtypes
object Accepted_202.type
object BadGateway_502.type
object BadRequest_400.type
object Conflict_409.type
object Continue_100.type
object Created_201.type
object Forbidden_403.type
object Found_302.type
object GatewayTimeout_504.type
object Gone_410.type
object LengthRequired_411.type
object Locked_423.type
object MultiStatus_207.type
object NoContent_204.type
object NotAcceptable_406.type
object NotExtended_510.type
object NotFound_404.type
object NotImplemented_501.type
object NotModified_304.type
object Ok_200.type
object PartialContent_206.type
object Processing_102.type
object RequestTimeout_408.type
object ResetContent_205.type
object SeeOther_303.type
object Unauthorized_401.type
object Unknown_000.type
object UseProxy_305.type
object HttpStatus

HTTP status code collection.

HTTP status code collection.

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
trait HttpSyncClient[Req, Resp] extends HttpSyncClientBase[Req, Resp] with AutoCloseable

A synchronous HTTP Client interface

A synchronous HTTP Client interface

Attributes

Graph
Supertypes
trait AutoCloseable
trait HttpSyncClientBase[Req, Resp]
class Object
trait Matchable
class Any
Known subtypes
class HttpSyncClientAdapterBase[F, Req, Resp]
class HttpSyncClientAdapter[F, Req, Resp]
class HttpSyncClientAdapter[F[_], Req, Resp](asyncClient: HttpClient[F, Req, Resp]) extends HttpSyncClientAdapterBase[F, Req, Resp]

A synchronous HttpClient that awaits responses.

A synchronous HttpClient that awaits responses.

Attributes

Graph
Supertypes
class HttpSyncClientAdapterBase[F, Req, Resp]
trait HttpSyncClient[Req, Resp]
trait AutoCloseable
trait HttpSyncClientBase[Req, Resp]
class Object
trait Matchable
class Any
abstract class HttpSyncClientAdapterBase[F[_], Req, Resp](asyncClient: HttpClient[F, Req, Resp]) extends HttpSyncClient[Req, Resp]

Attributes

Graph
Supertypes
trait HttpSyncClient[Req, Resp]
trait AutoCloseable
trait HttpSyncClientBase[Req, Resp]
class Object
trait Matchable
class Any
Known subtypes
class HttpSyncClientAdapter[F, Req, Resp]
trait HttpSyncClientBase[Req, Resp]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait HttpSyncClient[Req, Resp]
class HttpSyncClientAdapterBase[F, Req, Resp]
class HttpSyncClientAdapter[F, Req, Resp]
object RPCContext

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object EmptyRPCContext.type
sealed trait RPCEncoding

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object JSON.type
object MsgPack.type

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
case class RPCErrorMessage(code: Int, codeName: String, message: String, stackTrace: Option[Seq[GenericStackTraceElement]], cause: Option[Throwable], appErrorCode: Option[Int], metadata: Map[String, Any])

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

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.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class RPCException(status: RPCStatus, message: String, cause: Option[Throwable], appErrorCode: Option[Int], metadata: Map[String, Any]) extends Exception

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

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

Attributes

Companion:
object
Graph
Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class RPCMethod(path: String, rpcInterfaceName: String, methodName: String, requestSurface: Surface, responseSurface: Surface)

RPC endpoint information

RPC endpoint information

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
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.

Attributes

Companion:
class
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed abstract class RPCStatus(val statusType: RPCStatusType, val grpcStatus: GrpcStatus) extends PackSupport

A base class for defining standard RPC error codes

A base class for defining standard RPC error codes

Attributes

Companion:
object
Graph
Supertypes
trait PackSupport
class Object
trait Matchable
class Any
Known subtypes
object ABORTED_U12.type
object ALREADY_EXISTS_U6.type
object CANCELLED_U11.type
object DATA_LOSS_I8.type
object EXCEEDED_BUDGET_R8.type
object INTERNAL_ERROR_I0.type
object INTERRUPTED_I5.type
object INVALID_REQUEST_U1.type
object NOT_FOUND_U5.type
object NOT_SUPPORTED_U7.type
object OUT_OF_MEMORY_R1.type
object OUT_OF_RANGE_U4.type
object SUCCESS_S0.type
object SYNTAX_ERROR_U3.type
object TIMEOUT_I3.type
object UNAVAILABLE_I2.type
object UNIMPLEMENTED_U8.type
object UNKNOWN_I1.type
object USER_ERROR_U0.type
sealed trait RPCStatusType extends PackSupport

RPC status types

RPC status types

Attributes

Companion:
object
Graph
Supertypes
trait PackSupport
class Object
trait Matchable
class Any
Known subtypes
object INTERNAL_ERROR.type
object RESOURCE_EXHAUSTED.type
object SUCCESS.type
object USER_ERROR.type

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
case class ServerAddress(host: String, port: Int, scheme: String)

Server address holder

Server address holder

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
object ServerAddress extends LogSupport

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
trait LogSupport
trait LazyLogger
trait LoggingMethods
trait Serializable
class Object
trait Matchable
class Any
Self type
object StaticContent extends LogSupport

Helper for returning static contents

Helper for returning static contents

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
trait LogSupport
trait LazyLogger
trait LoggingMethods
trait Serializable
class Object
trait Matchable
class Any
Self type
case class StaticContent(resourcePaths: List[ResourceType])

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete fields