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. trait Path[A] extends EndpointsWithCustomErrors.Url[A]
  6. trait QueryString[T] extends AnyRef
  7. trait QueryStringParam[T] extends AnyRef

    Given a parameter name and a query string content, returns a decoded parameter value of type T, or Invalid if decoding failed

  8. trait Segment[A] extends AnyRef
  9. type StatusCode = org.apache.pekko.http.scaladsl.model.StatusCode

    HTTP Status Code

    HTTP Status Code

    Definition Classes
    StatusCodesStatusCodes
  10. trait Url[A] extends AnyRef
  11. 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: Success

    Definition Classes
    StatusCodesStatusCodes
  7. def AlreadyReported: Success

    Definition Classes
    StatusCodesStatusCodes
  8. def BadRequest: ClientError

    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: ClientError

    Definition Classes
    StatusCodesStatusCodes
  10. def Created: Success

    Definition Classes
    StatusCodesStatusCodes
  11. def ExpectationFailed: ClientError

    Definition Classes
    StatusCodesStatusCodes
  12. def FailedDependency: ClientError

    Definition Classes
    StatusCodesStatusCodes
  13. def Forbidden: ClientError

    Definition Classes
    StatusCodesStatusCodes
  14. def Gone: ClientError

    Definition Classes
    StatusCodesStatusCodes
  15. def IMUsed: Success

    Definition Classes
    StatusCodesStatusCodes
  16. def InternalServerError: ServerError

    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: ClientError

    Definition Classes
    StatusCodesStatusCodes
  18. def Locked: ClientError

    Definition Classes
    StatusCodesStatusCodes
  19. def MethodNotAllowed: ClientError

    Definition Classes
    StatusCodesStatusCodes
  20. def MisdirectedRequest: ClientError

    Definition Classes
    StatusCodesStatusCodes
  21. def MultiStatus: Success

    Definition Classes
    StatusCodesStatusCodes
  22. def NoContent: Success

    Definition Classes
    StatusCodesStatusCodes
  23. def NonAuthoritativeInformation: Success

    Definition Classes
    StatusCodesStatusCodes
  24. def NotAcceptable: ClientError

    Definition Classes
    StatusCodesStatusCodes
  25. def NotFound: ClientError

    Definition Classes
    StatusCodesStatusCodes
  26. def NotImplemented: ServerError

    Definition Classes
    StatusCodesStatusCodes
  27. def NotModified: Redirection

    Definition Classes
    StatusCodesStatusCodes
  28. def OK: Success

    Definition Classes
    StatusCodesStatusCodes
  29. def PartialContent: Success

    Definition Classes
    StatusCodesStatusCodes
  30. def PayloadTooLarge: ClientError

    Definition Classes
    StatusCodesStatusCodes
  31. def PaymentRequired: ClientError

    Definition Classes
    StatusCodesStatusCodes
  32. def PermanentRedirect: Redirection

    Definition Classes
    StatusCodesStatusCodes
  33. def PreconditionFailed: ClientError

    Definition Classes
    StatusCodesStatusCodes
  34. def PreconditionRequired: ClientError

    Definition Classes
    StatusCodesStatusCodes
  35. def ProxyAuthenticationRequired: ClientError

    Definition Classes
    StatusCodesStatusCodes
  36. def RangeNotSatisfiable: ClientError

    Definition Classes
    StatusCodesStatusCodes
  37. def RequestHeaderFieldsTooLarge: ClientError

    Definition Classes
    StatusCodesStatusCodes
  38. def RequestTimeout: ClientError

    Definition Classes
    StatusCodesStatusCodes
  39. def ResetContent: Success

    Definition Classes
    StatusCodesStatusCodes
  40. def TemporaryRedirect: Redirection

    Definition Classes
    StatusCodesStatusCodes
  41. def TooEarly: ClientError

    Definition Classes
    StatusCodesStatusCodes
  42. def TooManyRequests: ClientError

    Definition Classes
    StatusCodesStatusCodes
  43. def Unauthorized: ClientError

    Definition Classes
    StatusCodesStatusCodes
  44. def UnavailableForLegalReasons: ClientError

    Definition Classes
    StatusCodesStatusCodes
  45. def UnprocessableEntity: ClientError

    Definition Classes
    StatusCodesStatusCodes
  46. def UnsupportedMediaType: ClientError

    Definition Classes
    StatusCodesStatusCodes
  47. def UpgradeRequired: ClientError

    Definition Classes
    StatusCodesStatusCodes
  48. def UriTooLong: ClientError

    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. def convToDirective1(directive: Directive0): Directive1[Unit]
    Attributes
    protected
  55. 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
  56. implicit def doubleSegment: EndpointsWithCustomErrors.Segment[Double]

    Path segment codec for type Double

    Path segment codec for type Double

    Definition Classes
    Urls
  57. 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
  58. 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
  59. 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
  60. 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
  61. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  62. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  63. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  64. def handleClientErrors(invalid: Invalid): StandardRoute

    This method is called by endpoints4s when decoding a request failed.

    This method is called by endpoints4s when decoding a request failed.

    The provided implementation calls clientErrorsResponse to complete with a response containing the errors.

    This method can be overridden to customize the error reporting logic.

  65. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  66. implicit def intQueryString: EndpointsWithCustomErrors.QueryStringParam[Int]

    Ability to define Int query string parameters

    Ability to define Int query string parameters

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

    Path segment codec for type Int

    Path segment codec for type Int

    Definition Classes
    Urls
  68. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  69. def joinDirectives[T1, T2](dir1: Directive1[T1], dir2: Directive1[T2])(implicit tupler: Tupler[T1, T2]): Directive1[Out]

    Simpler alternative to Directive.&() method

    Simpler alternative to Directive.&() method

    Attributes
    protected
  70. implicit def longQueryString: EndpointsWithCustomErrors.QueryStringParam[Long]

    Query string parameter containing a Long value

    Query string parameter containing a Long value

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

    Path segment codec for type Long

    Path segment codec for type Long

    Definition Classes
    Urls
  72. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  73. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  74. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  75. 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
  76. 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
  77. 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
  78. implicit lazy val pathPartialInvariantFunctor: PartialInvariantFunctor[EndpointsWithCustomErrors.Path]

    Provides xmap and xmapPartial operations.

    Provides xmap and xmapPartial operations.

    Definition Classes
    UrlsUrls
    See also

    PartialInvariantFunctorSyntax and InvariantFunctorSyntax

  79. def qs[A](name: String, docs: Documentation)(implicit param: 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
  80. implicit lazy val queryStringParamPartialInvariantFunctor: PartialInvariantFunctor[EndpointsWithCustomErrors.QueryStringParam]

    Provides xmap and xmapPartial operations.

    Provides xmap and xmapPartial operations.

    Definition Classes
    UrlsUrls
    See also

    PartialInvariantFunctorSyntax and InvariantFunctorSyntax

  81. implicit lazy val queryStringPartialInvariantFunctor: PartialInvariantFunctor[EndpointsWithCustomErrors.QueryString]

    Provides xmap and xmapPartial operations.

    Provides xmap and xmapPartial operations.

    Definition Classes
    UrlsUrls
    See also

    PartialInvariantFunctorSyntax and InvariantFunctorSyntax

  82. def remainingSegments(name: String, docs: Documentation): 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
  83. 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
  84. def segment[A](name: String, docs: Documentation)(implicit s: EndpointsWithCustomErrors.Segment[A]): EndpointsWithCustomErrors.Path[A]

    A path segment carrying an A information

    A path segment carrying an A information

    Definition Classes
    UrlsUrls
  85. implicit lazy val segmentPartialInvariantFunctor: PartialInvariantFunctor[EndpointsWithCustomErrors.Segment]

    Provides xmap and xmapPartial operations.

    Provides xmap and xmapPartial operations.

    Definition Classes
    UrlsUrls
    See also

    PartialInvariantFunctorSyntax and InvariantFunctorSyntax

  86. 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
  87. implicit lazy val stringQueryString: EndpointsWithCustomErrors.QueryStringParam[String]

    Ability to define String query string parameters

    Ability to define String query string parameters

    Definition Classes
    UrlsUrls
  88. 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
  89. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  90. def toString(): String
    Definition Classes
    AnyRef → Any
  91. implicit lazy val urlPartialInvariantFunctor: PartialInvariantFunctor[EndpointsWithCustomErrors.Url]

    Provides xmap and xmapPartial operations

    Provides xmap and xmapPartial operations

    Definition Classes
    UrlsUrls
    See also

    PartialInvariantFunctorSyntax and InvariantFunctorSyntax

  92. 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
  93. implicit def uuidQueryString: EndpointsWithCustomErrors.QueryStringParam[UUID]

    Ability to define UUID query string parameters

    Ability to define UUID query string parameters

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

    Path segment codec for type UUID

    Path segment codec for type UUID

    Definition Classes
    Urls
  95. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  96. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  97. 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