p

zio

http

package http

Linear Supertypes
RouteDecoderModule, RequestSyntax, PathSyntax, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. http
  2. RouteDecoderModule
  3. RequestSyntax
  4. PathSyntax
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Package Members

  1. package codec
  2. package endpoint
  3. package html
  4. package internal
  5. package netty

Type Members

  1. type App[-R] = Http[R, Response, Request, Response]
  2. trait Body extends AnyRef

    Represents the body of a request or response.

    Represents the body of a request or response. The body can be a fixed chunk of bytes, a stream of bytes, or form data, or any type that can be encoded into such representations (such as textual data using some character encoding, the contents of files, JSON, etc.).

  3. final case class Boundary(id: String, charset: Charset) extends Product with Serializable

    A multipart boundary, which consists of both the boundary and its charset.

  4. trait Channel[-In, +Out] extends AnyRef

    A Channel is an asynchronous communication channel that supports receiving messages of type In and sending messages of type Out.

  5. sealed trait ChannelEvent[+A] extends AnyRef

    Immutable and type-safe representation of events that are triggered on a netty channel.

    Immutable and type-safe representation of events that are triggered on a netty channel. A represents the message type.

  6. type Client = ZClient[Any, Body, Throwable, Response]
  7. trait ClientDriver extends AnyRef
  8. sealed trait ClientSSLConfig extends AnyRef
  9. trait ComposeLowPriorityImplicits extends AnyRef
  10. trait ConnectionPool[Connection] extends AnyRef
  11. sealed trait ConnectionPoolConfig extends AnyRef
  12. sealed trait Cookie extends AnyRef

    Cookie is an immutable and type-safe representation of an HTTP cookie.

    Cookie is an immutable and type-safe representation of an HTTP cookie. There are two types of cookies: request cookies and response cookies. These can be created with the constructors in the companion object of Cookie.

  13. sealed trait Decompression extends AnyRef
  14. trait DnsResolver extends AnyRef
  15. trait Driver extends AnyRef
  16. type EHttpApp = Http[Any, Throwable, Request, Response]
  17. trait Extractor extends AnyRef

    Path is an immutable representation of a urls path.

    Path is an immutable representation of a urls path. Internally it stores each element of a path in a sequence of Segment. This allows for powerful compositional APIs.

  18. final case class Form(formData: Chunk[FormField]) extends Product with Serializable

    Represents a form that can be either multipart or url encoded.

  19. sealed trait FormDecodingError extends Exception

    Represents a form decoding error.

  20. sealed trait FormField extends AnyRef

    Represents a field in a form.

    Represents a field in a form. Every field contains name, content type (perhaps just plaintext), type-specific content, and an optional filename.

  21. sealed trait Handler[-R, +Err, -In, +Out] extends AnyRef
  22. type HandlerAspect[+LowerEnv, -UpperEnv, +LowerErr, -UpperErr] = Contextual[LowerEnv, UpperEnv, LowerErr, UpperErr] { ... /* 2 definitions in type refinement */ }
  23. sealed trait Header extends AnyRef
  24. sealed trait Headers extends HeaderOps[Headers] with Iterable[Header]

    Represents an immutable collection of headers.

    Represents an immutable collection of headers. It extends HeaderExtensions and has a ton of powerful operators that can be used to add, remove and modify headers.

    NOTE: Generic operators that are not specific to Headers should not be defined here. A better place would be one of the traits extended by HeaderExtension.

  25. sealed trait Http[-R, +Err, -In, +Out] extends AnyRef
  26. type HttpApp[-R, +Err] = Http[R, Err, Request, Response]
  27. type HttpAppMiddleware[+LowerEnv, -UpperEnv, +LowerErr, -UpperErr] = Contextual[LowerEnv, UpperEnv, LowerErr, UpperErr] { ... /* 2 definitions in type refinement */ }
  28. sealed abstract class HttpError extends Throwable
  29. case class IntExtractor(int: Int) extends Extractor with Product with Serializable
  30. final case class MediaType(mainType: String, subType: String, compressible: Boolean = false, binary: Boolean = false, fileExtensions: List[String] = Nil, extensions: Map[String, String] = Map.empty, parameters: Map[String, String] = Map.empty) extends Product with Serializable
  31. sealed trait Method extends AnyRef

    Represents an HTTP method, such as GET, PUT, POST, or DELETE.

  32. final case class Path extends Product with Serializable
  33. final case class Proxy(url: URL, credentials: Option[Credentials] = None, headers: Headers = Headers.empty) extends Product with Serializable

    Represents the connection to the forward proxy before running the request

  34. final case class QueryParams(map: Map[String, Chunk[String]]) extends Product with Serializable

    A collection of query parameters.

  35. type RHttpApp[-R] = Http[R, Throwable, Request, Response]
  36. final case class Request(body: Body, headers: Headers, method: Method, url: URL, version: Version, remoteAddress: Option[InetAddress]) extends HeaderOps[Request] with Product with Serializable
  37. type RequestHandler[-R, +Err] = Handler[R, Err, Request, Response]
  38. type RequestHandlerMiddleware[+LowerEnv, -UpperEnv, +LowerErr, -UpperErr] = Contextual[LowerEnv, UpperEnv, LowerErr, UpperErr] { ... /* 2 definitions in type refinement */ }
  39. sealed trait Response extends HeaderOps[Response]
  40. trait RouteDecoderModule extends AnyRef

    Instead of using just String as path params, using the RouteDecoderModule we can extract and converted params into a specific type also.

    Instead of using just String as path params, using the RouteDecoderModule we can extract and converted params into a specific type also.

    scala Http.collect[Request] { case GET -> Root / "user" / int(id) => Response.text("User id requested: ${id}") case GET -> Root / "user" / name => Response.text("User name requested: ${name}") }

    If the request looks like GET /user/100 then it would match the first case. This is because internally the id param can be decoded into an Int. If a request of the form GET /user/zio is made, in that case the second case is matched.

  41. abstract class RouteDecode[A] extends AnyRef
    Definition Classes
    RouteDecoderModule
  42. final case class SSLConfig(behaviour: HttpBehaviour, data: Data, provider: Provider) extends Product with Serializable
  43. sealed trait Scheme extends AnyRef
  44. trait Server extends AnyRef

    Represents a server, which is capable of serving zero or more HTTP applications.

  45. final case class ServerSentEvent(data: String, eventType: Option[String] = None, id: Option[String] = None, retry: Option[Int] = None) extends Product with Serializable

    Server-Sent Event (SSE) as defined by https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events

    Server-Sent Event (SSE) as defined by https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events

    data

    data, may span multiple lines

    eventType

    optional type, must not contain \n or \r

    id

    optional id, must not contain \n or \r

    retry

    optional reconnection delay in milliseconds

  46. type SocketApp[-R] = Handler[R, Throwable, WebSocketChannel, Any]
  47. final case class SocketDecoder(maxFramePayloadLength: Int = 65536, expectMaskedFrames: Boolean = true, allowMaskMismatch: Boolean = false, allowExtensions: Boolean = false, closeOnProtocolViolation: Boolean = true, withUTF8Validator: Boolean = true) extends Product with Serializable

    Frame decoder configuration

  48. sealed trait Status extends Product with Serializable
  49. final case class StreamingForm(source: ZStream[Any, Throwable, Byte], boundary: Boundary, bufferSize: Int = 8192) extends Product with Serializable
  50. type UHttp[-A, +B] = Http[Any, Nothing, A, B]
  51. type UHttpApp = Http[Any, Nothing, Request, Response]
  52. final case class URL(path: Path, kind: Location = URL.Location.Relative, queryParams: QueryParams = QueryParams.empty, fragment: Option[Fragment] = None) extends Product with Serializable
  53. sealed trait Version extends AnyRef
  54. type WebSocketChannel = Channel[WebSocketChannelEvent, WebSocketChannelEvent]

    A channel that allows websocket frames to be written to it.

  55. type WebSocketChannelEvent = ChannelEvent[WebSocketFrame]

    A channel that allows websocket frames to be read and write to it.

  56. final case class WebSocketConfig(subprotocols: Option[String] = None, handshakeTimeoutMillis: Long = 10000L, forceCloseTimeoutMillis: Long = -1L, handleCloseFrames: Boolean = true, sendCloseFrame: CloseStatus = WebSocketConfig.CloseStatus.NormalClosure, dropPongFrames: Boolean = true, decoderConfig: SocketDecoder = SocketDecoder.default) extends Product with Serializable

    Server side websocket configuration

  57. sealed trait WebSocketFrame extends Product with Serializable
  58. trait ZClient[-Env, -In, +Err, +Out] extends HeaderOps[ZClient[Env, In, Err, Out]]
  59. trait ZClientAspect[+LowerEnv, -UpperEnv, +LowerIn, -UpperIn, +LowerErr, -UpperErr, +LowerOut, -UpperOut] extends AnyRef

    A ZClientAspect is capable on modifying some aspect of the execution of a client, such as metrics, tracing, encoding, decoding, or logging.

  60. trait ZCompose[+LeftLower, -LeftUpper, LeftOut[In], +RightLower, -RightUpper, RightOut[In]] extends AnyRef

Value Members

  1. def Client: ZClient.type
  2. val Empty: Path
    Definition Classes
    PathSyntax
  3. val Root: Path
    Definition Classes
    PathSyntax
  4. object ->
    Definition Classes
    RequestSyntax
  5. object /
    Definition Classes
    PathSyntax
  6. object /:
    Definition Classes
    PathSyntax
  7. object Body
  8. object Boundary extends Serializable
  9. object ChannelEvent
  10. object Charsets
  11. object ClientDriver
  12. object ClientSSLConfig
  13. object ConnectionPoolConfig
  14. object Cookie
  15. object Decompression
  16. object DnsResolver
  17. object Driver
  18. object Form extends Serializable
  19. object FormDecodingError extends Serializable
  20. object FormField
  21. object Handler
  22. object HandlerAspect
  23. object Header
  24. object Headers
  25. object Http
  26. object HttpAppMiddleware extends RequestHandlerMiddlewares with HttpRoutesMiddlewares
  27. object HttpError extends Serializable
  28. object HttpRoutesMiddlewares extends HttpRoutesMiddlewares
  29. object MediaType extends MediaTypes with Serializable
  30. object Method
  31. object Path extends Serializable
  32. object Proxy extends Serializable
  33. object QueryParams extends Serializable
  34. object Request extends Serializable
  35. object RequestHandlerMiddleware
  36. object RequestHandlerMiddlewares extends RequestHandlerMiddlewares
  37. object Response
  38. object boolean extends RouteDecode[Boolean]
    Definition Classes
    RouteDecoderModule
  39. object byte extends RouteDecode[Byte]
    Definition Classes
    RouteDecoderModule
  40. object date extends RouteDecode[LocalDate]
    Definition Classes
    RouteDecoderModule
  41. object double extends RouteDecode[Double]
    Definition Classes
    RouteDecoderModule
  42. object float extends RouteDecode[Float]
    Definition Classes
    RouteDecoderModule
  43. object int extends RouteDecode[Int]
    Definition Classes
    RouteDecoderModule
  44. object long extends RouteDecode[Long]
    Definition Classes
    RouteDecoderModule
  45. object short extends RouteDecode[Short]
    Definition Classes
    RouteDecoderModule
  46. object time extends RouteDecode[LocalDateTime]
    Definition Classes
    RouteDecoderModule
  47. object uuid extends RouteDecode[UUID]
    Definition Classes
    RouteDecoderModule
  48. object SSLConfig extends Serializable
  49. object Scheme
  50. object Server
  51. object ServerSentEvent extends Serializable
  52. object SocketDecoder extends Serializable
  53. object Status extends Serializable
  54. object StreamingForm extends Serializable
  55. object URL extends Serializable
  56. object Version
  57. object WebSocketConfig extends Serializable
  58. object WebSocketFrame extends Serializable
  59. object ZClient
  60. object ZClientAspect
  61. object ZCompose extends ComposeLowPriorityImplicits

Inherited from RouteDecoderModule

Inherited from RequestSyntax

Inherited from PathSyntax

Inherited from AnyRef

Inherited from Any

Ungrouped