Trait

endpoints.algebra

Requests

Related Doc: package algebra

Permalink

trait Requests extends Urls with Methods with InvariantFunctorSyntax with SemigroupalSyntax

Source
Requests.scala
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Requests
  2. SemigroupalSyntax
  3. InvariantFunctorSyntax
  4. Methods
  5. Urls
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. implicit class InvariantFunctorSyntax[A, F[_]] extends AnyRef

    Permalink
    Definition Classes
    InvariantFunctorSyntax
  2. abstract type Method

    Permalink

    HTTP Method

    HTTP Method

    Definition Classes
    Methods
  3. abstract type Path[A] <: Url[A]

    Permalink

    An URL path carrying an A information

    An URL path carrying an A information

    Definition Classes
    Urls
  4. implicit class PathOps[A] extends AnyRef

    Permalink

    Convenient methods for Paths.

    Convenient methods for Paths.

    Definition Classes
    Urls
  5. abstract type QueryString[A]

    Permalink

    A query string carrying an A information

    A query string carrying an A information

    QueryString values can be created with the qs operation, and can be combined with the & operation:

    val queryPageAndLang: QueryString[(Int, Option[String])] =
      qs[Int]("page") & qs[Option[String]]("lang")
    Definition Classes
    Urls
  6. implicit class QueryStringOps[A] extends AnyRef

    Permalink

    Provides convenient methods on QueryString.

    Provides convenient methods on QueryString.

    Definition Classes
    Urls
  7. abstract type QueryStringParam[A]

    Permalink

    A single query string parameter carrying an A information.

    A single query string parameter carrying an A information.

    Definition Classes
    Urls
  8. abstract type Request[A]

    Permalink

    Information carried by a whole request (headers and entity)

  9. abstract type RequestEntity[A]

    Permalink

    Information carried by request entity

  10. abstract type RequestHeaders[A]

    Permalink

    Information carried by requests’ headers

  11. abstract type Segment[A]

    Permalink

    An URL path segment carrying an A information.

    An URL path segment carrying an A information.

    Definition Classes
    Urls
  12. implicit class SemigroupalSyntax[A, F[_]] extends AnyRef

    Permalink
    Definition Classes
    SemigroupalSyntax
  13. abstract type Url[A]

    Permalink

    An URL carrying an A information

    An URL carrying an A information

    Definition Classes
    Urls

Abstract Value Members

  1. abstract def Delete: Method

    Permalink
    Definition Classes
    Methods
  2. abstract def Get: Method

    Permalink
    Definition Classes
    Methods
  3. abstract def Options: Method

    Permalink
    Definition Classes
    Methods
  4. abstract def Patch: Method

    Permalink
    Definition Classes
    Methods
  5. abstract def Post: Method

    Permalink
    Definition Classes
    Methods
  6. abstract def Put: Method

    Permalink
    Definition Classes
    Methods
  7. abstract def chainPaths[A, B](first: Path[A], second: Path[B])(implicit tupler: Tupler[A, B]): Path[Out]

    Permalink

    Chains the two paths

    Chains the two paths

    Definition Classes
    Urls
  8. abstract def combineQueryStrings[A, B](first: QueryString[A], second: QueryString[B])(implicit tupler: Tupler[A, B]): QueryString[Out]

    Permalink

    Concatenates two QueryStrings

    Concatenates two QueryStrings

    Definition Classes
    Urls
  9. abstract def emptyHeaders: RequestHeaders[Unit]

    Permalink

    No particular information.

    No particular information. Does not mean that the headers *have to* be empty. Just that, from a server point of view no information will be extracted from them, and from a client point of view no particular headers will be built in the request.

  10. abstract def emptyRequest: RequestEntity[Unit]

    Permalink

    Empty request.

  11. abstract def header(name: String, docs: Documentation = None): RequestHeaders[String]

    Permalink
  12. implicit abstract def intSegment: Segment[Int]

    Permalink

    Ability to define Int path segments

    Ability to define Int path segments

    Definition Classes
    Urls
  13. implicit abstract def longSegment: Segment[Long]

    Permalink

    Segment containing a Long value

    Segment containing a Long value

    Definition Classes
    Urls
  14. abstract def optHeader(name: String, docs: Documentation = None): RequestHeaders[Option[String]]

    Permalink
  15. implicit abstract def optionalQueryStringParam[A](implicit arg0: QueryStringParam[A]): QueryStringParam[Option[A]]

    Permalink

    Make a query string parameter optional:

    Make a query string parameter optional:

    path / "articles" /? qs[Option[Int]]("page")

    Client interpreters must omit optional query string parameters that are empty. Server interpreters must accept incoming requests whose optional query string parameters are missing. Server interpreters must report a failure for incoming requests whose optional query string parameters are present, but malformed.

    Definition Classes
    Urls
  16. abstract def qs[A](name: String, docs: Documentation = None)(implicit value: QueryStringParam[A]): QueryString[A]

    Permalink

    Builds a QueryString with one parameter.

    Builds a QueryString with one parameter.

    Examples:

    qs[Int]("page")            // mandatory `page` parameter
    qs[Option[String]]("lang") // optional `lang` parameter
    qs[List[Long]]("id")       // repeated `id` parameter
    A

    Type of the value carried by the parameter

    name

    Parameter’s name

    Definition Classes
    Urls
  17. abstract def refineQueryStringParam[A, B](pa: QueryStringParam[A])(f: (A) ⇒ Option[B])(g: (B) ⇒ A): QueryStringParam[B]

    Permalink

    Ability to refine a query string parameter for a type A into a query string parameter for a type B given a pair of decoding/encoding functions between A and B.

    Ability to refine a query string parameter for a type A into a query string parameter for a type B given a pair of decoding/encoding functions between A and B.

    A

    The type of the available query string parameter.

    B

    The type of the desired query string parameter.

    pa

    A query string parameter for a type A

    f

    Decoding function from A to Option[B]

    g

    Encoding function from B to A

    returns

    A query string parameter for a type B built by refinement from pa.

    Definition Classes
    Urls
  18. abstract def refineSegment[A, B](sa: Segment[A])(f: (A) ⇒ Option[B])(g: (B) ⇒ A): Segment[B]

    Permalink

    Ability to refine a path segment for a type A into a path segment for a type B given a pair of decoding/encoding functions between A and B.

    Ability to refine a path segment for a type A into a path segment for a type B given a pair of decoding/encoding functions between A and B.

    A

    The type of the available path segment.

    B

    The type of the desired path segment.

    sa

    A path segment for a type A

    f

    Decoding function from A to Option[B]

    g

    Encoding function from B to A

    returns

    A path segment for a type B built by refinement from sa.

    Definition Classes
    Urls
  19. implicit abstract def repeatedQueryStringParam[A, CC[X] <: Iterable[X]](implicit arg0: QueryStringParam[A], factory: scala.collection.compat.Factory[A, CC[A]]): QueryStringParam[CC[A]]

    Permalink

    Support query string parameters with multiple values:

    Support query string parameters with multiple values:

    path / "articles" /? qs[List[Long]]("id")

    Server interpreters must accept incoming requests where such parameters are missing (in such a case, its value is an empty collection), and report a failure if at least one value is malformed.

    Definition Classes
    Urls
  20. implicit abstract def reqEntityInvFunctor: InvariantFunctor[RequestEntity]

    Permalink
  21. implicit abstract def reqHeadersInvFunctor: InvariantFunctor[RequestHeaders]

    Permalink
  22. implicit abstract def reqHeadersSemigroupal: Semigroupal[RequestHeaders]

    Permalink
  23. abstract def request[UrlP, BodyP, HeadersP, UrlAndBodyPTupled, Out](method: Method, url: Url[UrlP], entity: RequestEntity[BodyP] = emptyRequest, headers: RequestHeaders[HeadersP] = emptyHeaders)(implicit tuplerUB: Tupler.Aux[UrlP, BodyP, UrlAndBodyPTupled], tuplerUBH: Tupler.Aux[UrlAndBodyPTupled, HeadersP, Out]): Request[Out]

    Permalink

    Request for given parameters

    Request for given parameters

    UrlP

    Payload carried by url

    BodyP

    Payload carried by body

    HeadersP

    Payload carried by headers

    UrlAndBodyPTupled

    Payloads of Url and Body tupled together by Tupler

    method

    Request method

    url

    Request URL

    entity

    Request entity

    headers

    Request headers

  24. abstract def segment[A](name: String = "", docs: Documentation = None)(implicit s: Segment[A]): Path[A]

    Permalink

    Builds a path segment carrying an A information

    Builds a path segment carrying an A information

    Definition Classes
    Urls
  25. abstract def staticPathSegment(segment: String): Path[Unit]

    Permalink

    Builds a static path segment

    Builds a static path segment

    Definition Classes
    Urls
  26. implicit abstract def stringQueryString: QueryStringParam[String]

    Permalink

    Ability to define String query string parameters

    Ability to define String query string parameters

    Definition Classes
    Urls
  27. implicit abstract def stringSegment: Segment[String]

    Permalink

    Ability to define String path segments

    Ability to define String path segments

    Definition Classes
    Urls
  28. abstract def textRequest(docs: Documentation = None): RequestEntity[String]

    Permalink

    Request with string body.

  29. implicit abstract def urlInvFunctor: InvariantFunctor[Url]

    Permalink
    Definition Classes
    Urls
  30. abstract def urlWithQueryString[A, B](path: Path[A], qs: QueryString[B])(implicit tupler: Tupler[A, B]): Url[Out]

    Permalink

    Builds an URL from the given path and query string

    Builds an URL from the given path and query string

    Definition Classes
    Urls

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. implicit def booleanQueryString: QueryStringParam[Boolean]

    Permalink

    Query string parameter containing a Boolean value

    Query string parameter containing a Boolean value

    Definition Classes
    Urls
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def delete[UrlP, HeadersP, Out](url: Url[UrlP], headers: RequestHeaders[HeadersP] = emptyHeaders)(implicit tuplerUH: Tupler.Aux[UrlP, HeadersP, Out]): Request[Out]

    Permalink

    Helper method to perform DELETE request

    Helper method to perform DELETE request

    UrlP

    Payload carried by url

    HeadersP

    Payload carried by headers

  8. implicit def doubleQueryString: QueryStringParam[Double]

    Permalink
    Definition Classes
    Urls
  9. implicit def dummyPathToUrl[A](p: Path[A]): Url[A]

    Permalink

    Implicit conversion to get rid of intellij errors when defining paths.

    Implicit conversion to get rid of intellij errors when defining paths. Effectively should not be called.

    Definition Classes
    Urls
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def get[UrlP, HeadersP, Out](url: Url[UrlP], headers: RequestHeaders[HeadersP] = emptyHeaders)(implicit tuplerUH: Tupler.Aux[UrlP, HeadersP, Out]): Request[Out]

    Permalink

    Helper method to perform GET request

    Helper method to perform GET request

    UrlP

    Payload carried by url

    HeadersP

    Payload carried by headers

  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. implicit def intQueryString: QueryStringParam[Int]

    Permalink

    Ability to define Int query string parameters

    Ability to define Int query string parameters

    Definition Classes
    Urls
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. implicit def longQueryString: QueryStringParam[Long]

    Permalink

    Query string parameter containing a Long value

    Query string parameter containing a Long value

    Definition Classes
    Urls
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. val path: Path[Unit]

    Permalink

    An empty path.

    An empty path.

    Useful to begin a path definition:

    path / "foo" / segment[Int] /? qs[String]("bar")
    Definition Classes
    Urls
  23. final def post[UrlP, BodyP, HeadersP, UrlAndBodyPTupled, Out](url: Url[UrlP], entity: RequestEntity[BodyP], headers: RequestHeaders[HeadersP] = emptyHeaders)(implicit tuplerUB: Tupler.Aux[UrlP, BodyP, UrlAndBodyPTupled], tuplerUBH: Tupler.Aux[UrlAndBodyPTupled, HeadersP, Out]): Request[Out]

    Permalink

    Helper method to perform POST request

    Helper method to perform POST request

    UrlP

    Payload carried by url

    BodyP

    Payload carried by body

    HeadersP

    Payload carried by headers

    UrlAndBodyPTupled

    Payloads of Url and Body tupled together by Tupler

  24. final def put[UrlP, BodyP, HeadersP, UrlAndBodyPTupled, Out](url: Url[UrlP], entity: RequestEntity[BodyP], headers: RequestHeaders[HeadersP] = emptyHeaders)(implicit tuplerUB: Tupler.Aux[UrlP, BodyP, UrlAndBodyPTupled], tuplerUBH: Tupler.Aux[UrlAndBodyPTupled, HeadersP, Out]): Request[Out]

    Permalink

    Helper method to perform PUT request

    Helper method to perform PUT request

    UrlP

    Payload carried by url

    BodyP

    Payload carried by body

    HeadersP

    Payload carried by headers

    UrlAndBodyPTupled

    Payloads of Url and Body tupled together by Tupler

  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  26. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  27. implicit def uuidQueryString: QueryStringParam[UUID]

    Permalink

    Ability to define UUID query string parameters

    Ability to define UUID query string parameters

    Definition Classes
    Urls
  28. implicit def uuidSegment: Segment[UUID]

    Permalink

    Ability to define UUID path segments

    Ability to define UUID path segments

    Definition Classes
    Urls
  29. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Methods

Inherited from Urls

Inherited from AnyRef

Inherited from Any

Ungrouped