Packages

trait Urls extends algebra.Urls with StatusCodes

algebra.Urls interpreter that decodes and encodes URLs.

Self Type
EndpointsWithCustomErrors
Source
Urls.scala
Type Hierarchy
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. Urls
  2. StatusCodes
  3. StatusCodes
  4. Urls
  5. PartialInvariantFunctorSyntax
  6. InvariantFunctorSyntax
  7. AnyRef
  8. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

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

    Extension methods for values of type F[A] for which there is an implicit InvariantFunctor[F] instance.

    Extension methods for values of type F[A] for which there is an implicit InvariantFunctor[F] instance.

    Definition Classes
    InvariantFunctorSyntax
  2. implicit class PartialInvariantFunctorSyntax[A, F[_]] extends AnyRef
  3. implicit class PathOps[A] extends AnyRef

    Convenient methods for Paths.

    Convenient methods for Paths.

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

    Extension methods on QueryString.

    Extension methods on QueryString.

    Definition Classes
    Urls
  5. abstract type Effect[A]
  6. type Params = Map[String, Seq[String]]
  7. trait Path[A] extends EndpointsWithCustomErrors.Url[A]
  8. type QueryString[A] = (EndpointsWithCustomErrors.Params) => Validated[A]

    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")
    • Server interpreters raise an error if they can’t parse the incoming request query string parameters as a value of type A. By default, they produce a Bad Request (400) response with a list of error messages in a JSON array. Refer to the documentation of your server interpreter to customize this behavior.
    Definition Classes
    UrlsUrls
    Note

    This type has implicit methods provided by the QueryStringSyntax, InvariantFunctorSyntax, and the PartialInvariantFunctorSyntax classes.

  9. trait QueryStringParam[A] extends AnyRef
  10. trait Segment[A] extends AnyRef
  11. type StatusCode = Status

    HTTP Status Code

    HTTP Status Code

    Definition Classes
    StatusCodesStatusCodes
  12. trait Url[A] extends AnyRef
  13. type WithDefault[A] = A

    This type is necessary to express different perspectives of servers and clients on optional query string parameters with default value:

    This type is necessary to express different perspectives of servers and clients on optional query string parameters with default value:

    • Client interpreters should define it as Option[A] and omit query string parameters with default value that are empty
    • Server interpreters should define it as A and accept incoming requests whose query string parameters with default value are missing, while providing the defined default value
    • Documentation interpreters should mark the parameter as optional and document the provided default value
    Definition Classes
    UrlsUrls

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from Urls toany2stringadd[Urls] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Urls, B)
    Implicit
    This member is added by an implicit conversion from Urls toArrowAssoc[Urls] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def Accepted: Status

    Definition Classes
    StatusCodesStatusCodes
  7. def AlreadyReported: Status

    Definition Classes
    StatusCodesStatusCodes
  8. def BadRequest: Status

    Definition Classes
    StatusCodesStatusCodes
    Note

    You should use the badRequest constructor provided by the endpoints4s.algebra.Responses trait to ensure that errors produced by endpoints4s are consistently handled by interpreters.

  9. def Conflict: Status

    Definition Classes
    StatusCodesStatusCodes
  10. def Created: Status

    Definition Classes
    StatusCodesStatusCodes
  11. def ExpectationFailed: Status

    Definition Classes
    StatusCodesStatusCodes
  12. def FailedDependency: Status

    Definition Classes
    StatusCodesStatusCodes
  13. def Forbidden: Status

    Definition Classes
    StatusCodesStatusCodes
  14. def Gone: Status

    Definition Classes
    StatusCodesStatusCodes
  15. def IMUsed: Status

    Definition Classes
    StatusCodesStatusCodes
  16. def InternalServerError: Status

    Definition Classes
    StatusCodesStatusCodes
    Note

    You should use the internalServerError constructor provided by the endpoints4s.algebra.Responses trait to ensure that errors produced by endpoints4s are consistently handled by interpreters.

  17. def LengthRequired: Status

    Definition Classes
    StatusCodesStatusCodes
  18. def Locked: Status

    Definition Classes
    StatusCodesStatusCodes
  19. def MethodNotAllowed: Status

    Definition Classes
    StatusCodesStatusCodes
  20. def MisdirectedRequest: Status

    Definition Classes
    StatusCodesStatusCodes
  21. def MultiStatus: Status

    Definition Classes
    StatusCodesStatusCodes
  22. def NoContent: Status

    Definition Classes
    StatusCodesStatusCodes
  23. def NonAuthoritativeInformation: Status

    Definition Classes
    StatusCodesStatusCodes
  24. def NotAcceptable: Status

    Definition Classes
    StatusCodesStatusCodes
  25. def NotFound: Status

    Definition Classes
    StatusCodesStatusCodes
  26. def NotImplemented: Status

    Definition Classes
    StatusCodesStatusCodes
  27. def NotModified: Status

    Definition Classes
    StatusCodesStatusCodes
  28. def OK: Status

    Definition Classes
    StatusCodesStatusCodes
  29. def PartialContent: Status

    Definition Classes
    StatusCodesStatusCodes
  30. def PayloadTooLarge: Status

    Definition Classes
    StatusCodesStatusCodes
  31. def PaymentRequired: Status

    Definition Classes
    StatusCodesStatusCodes
  32. def PermanentRedirect: Status

    Definition Classes
    StatusCodesStatusCodes
  33. def PreconditionFailed: Status

    Definition Classes
    StatusCodesStatusCodes
  34. def PreconditionRequired: Status

    Definition Classes
    StatusCodesStatusCodes
  35. def ProxyAuthenticationRequired: Status

    Definition Classes
    StatusCodesStatusCodes
  36. def RangeNotSatisfiable: Status

    Definition Classes
    StatusCodesStatusCodes
  37. def RequestHeaderFieldsTooLarge: Status

    Definition Classes
    StatusCodesStatusCodes
  38. def RequestTimeout: Status

    Definition Classes
    StatusCodesStatusCodes
  39. def ResetContent: Status

    Definition Classes
    StatusCodesStatusCodes
  40. def TemporaryRedirect: Status

    Definition Classes
    StatusCodesStatusCodes
  41. def TooEarly: Status

    Definition Classes
    StatusCodesStatusCodes
  42. def TooManyRequests: Status

    Definition Classes
    StatusCodesStatusCodes
  43. def Unauthorized: Status

    Definition Classes
    StatusCodesStatusCodes
  44. def UnavailableForLegalReasons: Status

    Definition Classes
    StatusCodesStatusCodes
  45. def UnprocessableEntity: Status

    Definition Classes
    StatusCodesStatusCodes
  46. def UnsupportedMediaType: Status

    Definition Classes
    StatusCodesStatusCodes
  47. def UpgradeRequired: Status

    Definition Classes
    StatusCodesStatusCodes
  48. def UriTooLong: Status

    Definition Classes
    StatusCodesStatusCodes
  49. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  50. implicit def booleanQueryString: EndpointsWithCustomErrors.QueryStringParam[Boolean]

    Query string parameter containing a Boolean value

    Query string parameter containing a Boolean value

    Definition Classes
    Urls
  51. def chainPaths[A, B](first: EndpointsWithCustomErrors.Path[A], second: EndpointsWithCustomErrors.Path[B])(implicit tupler: Tupler[A, B]): EndpointsWithCustomErrors.Path[Out]

    Chains the two paths

    Chains the two paths

    Definition Classes
    UrlsUrls
  52. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  53. def combineQueryStrings[A, B](first: EndpointsWithCustomErrors.QueryString[A], second: EndpointsWithCustomErrors.QueryString[B])(implicit tupler: Tupler[A, B]): EndpointsWithCustomErrors.QueryString[Out]

    Concatenates two QueryStrings

    Concatenates two QueryStrings

    Definition Classes
    UrlsUrls
  54. implicit def doubleQueryString: EndpointsWithCustomErrors.QueryStringParam[Double]

    Codec for query string parameters of type Double

    Codec for query string parameters of type Double

    Definition Classes
    Urls
  55. implicit def doubleSegment: EndpointsWithCustomErrors.Segment[Double]

    Path segment codec for type Double

    Path segment codec for type Double

    Definition Classes
    Urls
  56. def ensuring(cond: (Urls) => Boolean, msg: => Any): Urls
    Implicit
    This member is added by an implicit conversion from Urls toEnsuring[Urls] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  57. def ensuring(cond: (Urls) => Boolean): Urls
    Implicit
    This member is added by an implicit conversion from Urls toEnsuring[Urls] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  58. def ensuring(cond: Boolean, msg: => Any): Urls
    Implicit
    This member is added by an implicit conversion from Urls toEnsuring[Urls] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  59. def ensuring(cond: Boolean): Urls
    Implicit
    This member is added by an implicit conversion from Urls toEnsuring[Urls] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  60. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  61. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  62. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  63. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  64. implicit def intQueryString: EndpointsWithCustomErrors.QueryStringParam[Int]

    Ability to define Int query string parameters

    Ability to define Int query string parameters

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

    Path segment codec for type Int

    Path segment codec for type Int

    Definition Classes
    Urls
  66. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  67. implicit def longQueryString: EndpointsWithCustomErrors.QueryStringParam[Long]

    Query string parameter containing a Long value

    Query string parameter containing a Long value

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

    Path segment codec for type Long

    Path segment codec for type Long

    Definition Classes
    Urls
  69. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  70. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  71. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  72. def optQsWithDefault[A](name: String, default: A, docs: Documentation = None)(implicit value: EndpointsWithCustomErrors.QueryStringParam[A]): EndpointsWithCustomErrors.QueryString[EndpointsWithCustomErrors.WithDefault[A]]

    Builds a QueryString with one optional parameter, which has a default value.

    Builds a QueryString with one optional parameter, which has a default value.

    Examples:

    optQsWithDefault[Int]("page", 1) // optional `page` parameter, with default value 1
    A

    Type of the value carried by the parameter

    name

    Parameter’s name

    Definition Classes
    UrlsUrls
  73. implicit def optionalQueryStringParam[A](implicit param: EndpointsWithCustomErrors.QueryStringParam[A]): EndpointsWithCustomErrors.QueryStringParam[Option[A]]

    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, and they must report a failure for incoming requests whose optional query string parameters are present, but malformed,
    • Documentation interpreters should mark the parameter as optional.
    Definition Classes
    UrlsUrls
  74. val path: EndpointsWithCustomErrors.Path[Unit]

    An empty path.

    An empty path.

    Useful to begin a path definition:

    path / "foo" / segment[Int] /? qs[String]("bar")
    Definition Classes
    Urls
  75. implicit def pathPartialInvariantFunctor: PartialInvariantFunctor[EndpointsWithCustomErrors.Path]

    Provides xmap and xmapPartial operations.

    Provides xmap and xmapPartial operations.

    Definition Classes
    UrlsUrls
    See also

    PartialInvariantFunctorSyntax and InvariantFunctorSyntax

  76. def qs[A](name: String, docs: Documentation = None)(implicit value: EndpointsWithCustomErrors.QueryStringParam[A]): EndpointsWithCustomErrors.QueryString[A]

    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
    UrlsUrls
  77. implicit def queryStringParamPartialInvariantFunctor: PartialInvariantFunctor[EndpointsWithCustomErrors.QueryStringParam]

    Provides xmap and xmapPartial operations.

    Provides xmap and xmapPartial operations.

    Definition Classes
    UrlsUrls
    See also

    PartialInvariantFunctorSyntax and InvariantFunctorSyntax

  78. implicit def queryStringPartialInvariantFunctor: PartialInvariantFunctor[EndpointsWithCustomErrors.QueryString]

    Provides xmap and xmapPartial operations.

    Provides xmap and xmapPartial operations.

    Definition Classes
    UrlsUrls
    See also

    PartialInvariantFunctorSyntax and InvariantFunctorSyntax

  79. def remainingSegments(name: String = "", docs: Documentation = None): EndpointsWithCustomErrors.Path[String]

    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
    UrlsUrls
  80. implicit def repeatedQueryStringParam[A, CC[X] <: Iterable[X]](implicit param: EndpointsWithCustomErrors.QueryStringParam[A], factory: Factory[A, CC[A]]): EndpointsWithCustomErrors.QueryStringParam[CC[A]]

    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
    UrlsUrls
  81. def segment[A](name: String = "", docs: Documentation = None)(implicit A: EndpointsWithCustomErrors.Segment[A]): EndpointsWithCustomErrors.Path[A]

    A path segment carrying an A information

    A path segment carrying an A information

    Definition Classes
    UrlsUrls
  82. implicit def segmentPartialInvariantFunctor: PartialInvariantFunctor[EndpointsWithCustomErrors.Segment]

    Provides xmap and xmapPartial operations.

    Provides xmap and xmapPartial operations.

    Definition Classes
    UrlsUrls
    See also

    PartialInvariantFunctorSyntax and InvariantFunctorSyntax

  83. def staticPathSegment(segment: String): EndpointsWithCustomErrors.Path[Unit]

    A path segment whose value is the given segment

    A path segment whose value is the given segment

    Definition Classes
    UrlsUrls
  84. implicit def stringQueryString: EndpointsWithCustomErrors.QueryStringParam[String]

    Ability to define String query string parameters

    Ability to define String query string parameters

    Definition Classes
    UrlsUrls
  85. implicit def stringSegment: EndpointsWithCustomErrors.Segment[String]

    Path segment codec for type String

    Path segment codec for type String

    • Server interpreters should return an URL-decoded string value,
    • Client interpreters should take an URL-decoded string value.
    Definition Classes
    UrlsUrls
  86. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  87. def toString(): String
    Definition Classes
    AnyRef → Any
  88. implicit def urlPartialInvariantFunctor: PartialInvariantFunctor[EndpointsWithCustomErrors.Url]

    Provides xmap and xmapPartial operations

    Provides xmap and xmapPartial operations

    Definition Classes
    UrlsUrls
    See also

    PartialInvariantFunctorSyntax and InvariantFunctorSyntax

  89. def urlWithQueryString[A, B](path: EndpointsWithCustomErrors.Path[A], qs: EndpointsWithCustomErrors.QueryString[B])(implicit tupler: Tupler[A, B]): EndpointsWithCustomErrors.Url[Out]

    Builds an URL from the given path and query string

    Builds an URL from the given path and query string

    Definition Classes
    UrlsUrls
  90. val utf8Name: String
  91. implicit def uuidQueryString: EndpointsWithCustomErrors.QueryStringParam[UUID]

    Ability to define UUID query string parameters

    Ability to define UUID query string parameters

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

    Path segment codec for type UUID

    Path segment codec for type UUID

    Definition Classes
    Urls
  93. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  94. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  95. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

  2. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from Urls toStringFormat[Urls] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  3. def [B](y: B): (Urls, B)
    Implicit
    This member is added by an implicit conversion from Urls toArrowAssoc[Urls] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from StatusCodes

Inherited from algebra.StatusCodes

Inherited from algebra.Urls

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromUrls to any2stringadd[Urls]

Inherited by implicit conversion StringFormat fromUrls to StringFormat[Urls]

Inherited by implicit conversion Ensuring fromUrls to Ensuring[Urls]

Inherited by implicit conversion ArrowAssoc fromUrls to ArrowAssoc[Urls]

Types

Types introduced by the algebra

Operations

Operations creating and transforming values

Ungrouped