Trait

endpoints.algebra

Requests

Related Doc: package algebra

Permalink

trait Requests extends Urls with Methods with SemigroupalSyntax

Source
Requests.scala
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Requests
  2. SemigroupalSyntax
  3. Methods
  4. Urls
  5. PartialInvariantFunctorSyntax
  6. InvariantFunctorSyntax
  7. AnyRef
  8. 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. implicit class PartialInvariantFunctorSyntax[A, F[_]] extends AnyRef

    Permalink
    Definition Classes
    PartialInvariantFunctorSyntax
  4. abstract type Path[A] <: Url[A]

    Permalink

    An URL path carrying an A information

    An URL path carrying an A information

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

    Permalink

    Convenient methods for Paths.

    Convenient methods for Paths.

    Definition Classes
    Urls
  6. 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
  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. implicit class QueryStringSyntax[A] extends AnyRef

    Permalink

    Extension methods on QueryString.

    Extension methods on QueryString.

    Definition Classes
    Urls
  9. abstract type Request[A]

    Permalink

    Information carried by a whole request (headers and entity)

  10. abstract type RequestEntity[A]

    Permalink

    Information carried by request entity

  11. abstract type RequestHeaders[A]

    Permalink

    Information carried by requests’ headers

  12. abstract type Segment[A]

    Permalink

    An URL path segment carrying an A information.

    An URL path segment carrying an A information.

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

    Permalink
    Definition Classes
    SemigroupalSyntax
  14. 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.

    Use description of endpoints.algebra.Endpoints#endpoint to document empty headers.

  10. abstract def emptyRequest: RequestEntity[Unit]

    Permalink

    Empty request -- request without a body.

    Empty request -- request without a body. Use description of endpoints.algebra.Endpoints#endpoint to document an empty body.

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

    Permalink
  12. abstract def optHeader(name: String, docs: Documentation = None): RequestHeaders[Option[String]]

    Permalink
  13. 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
  14. implicit abstract def pathPartialInvariantFunctor: PartialInvariantFunctor[Path]

    Permalink
    Definition Classes
    Urls
  15. 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
  16. implicit abstract def queryStringParamPartialInvFunctor: PartialInvariantFunctor[QueryStringParam]

    Permalink
    Definition Classes
    Urls
  17. implicit abstract def queryStringPartialInvFunctor: PartialInvariantFunctor[QueryString]

    Permalink
    Definition Classes
    Urls
  18. abstract def remainingSegments(name: String = "", docs: Documentation = None): Path[String]

    Permalink

    The remaining segments of the path.

    The remaining segments of the path. The String value carried by this Path is still URL-encoded.

    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, docs: Documentation = None, 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

    docs

    Request documentation

    headers

    Request headers

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

    Permalink

    A path segment carrying an A information

    A path segment carrying an A information

    Definition Classes
    Urls
  25. implicit abstract def segmentPartialInvFunctor: PartialInvariantFunctor[Segment]

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

    Permalink

    A path segment whose value is the given segment

    A path segment whose value is the given segment

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

    Permalink

    Ability to define String query string parameters

    Ability to define String query string parameters

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

    Permalink

    Ability to define String path segments Servers should return an URL-decoded string value, and clients should take an URL-decoded string value.

    Ability to define String path segments Servers should return an URL-decoded string value, and clients should take an URL-decoded string value.

    Definition Classes
    Urls
  29. abstract def textRequest: RequestEntity[String]

    Permalink

    Request with a String body.

  30. implicit abstract def urlPartialInvFunctor: PartialInvariantFunctor[Url]

    Permalink
    Definition Classes
    Urls
  31. 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], docs: Documentation = None, 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 doubleSegment: Segment[Double]

    Permalink
    Definition Classes
    Urls
  10. 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
  11. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def get[UrlP, HeadersP, Out](url: Url[UrlP], docs: Documentation = None, 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

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

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

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

    Permalink

    Ability to define Int query string parameters

    Ability to define Int query string parameters

    Definition Classes
    Urls
  18. implicit def intSegment: Segment[Int]

    Permalink

    Ability to define Int path segments

    Ability to define Int path segments

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

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

    Permalink

    Query string parameter containing a Long value

    Query string parameter containing a Long value

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

    Permalink

    Segment containing a Long value

    Segment containing a Long value

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

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

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

    Permalink
    Definition Classes
    AnyRef
  25. 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
  26. final def post[UrlP, BodyP, HeadersP, UrlAndBodyPTupled, Out](url: Url[UrlP], entity: RequestEntity[BodyP], docs: Documentation = None, 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

    docs

    Request documentation

  27. final def put[UrlP, BodyP, HeadersP, UrlAndBodyPTupled, Out](url: Url[UrlP], entity: RequestEntity[BodyP], docs: Documentation = None, 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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  30. def tryParseString[A](type: String)(parse: (String) ⇒ A): (String) ⇒ Validated[A]

    Permalink
    Definition Classes
    Urls
  31. implicit def uuidQueryString: QueryStringParam[UUID]

    Permalink

    Ability to define UUID query string parameters

    Ability to define UUID query string parameters

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

    Permalink

    Ability to define UUID path segments

    Ability to define UUID path segments

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. 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