Endpoints
An interpreter for endpoints4s.algebra.Endpoints that builds a client issuing requests using
a sttp’s com.softwaremill.sttp.SttpBackend
, and uses algebra.BuiltInErrors to model client
and server errors.
Doest not support streaming responses for now
- Type parameters:
- R
The monad wrapping the response. It is defined by the backend
- Value parameters:
- backend
The underlying backend to use
- host
Base of the URL of the service that implements the endpoints (e.g. "http://foo.com")
Type members
Inherited classlikes
- Value parameters:
- entity
Contents of the callback message
- method
HTTP method used for the callback
- response
Expected response
- Inherited from:
- EndpointsWithCustomErrors
A function that, given an A
, eventually attempts to decode the B
response.
A function that, given an A
, eventually attempts to decode the B
response.
- Inherited from:
- EndpointsWithCustomErrors
- Value parameters:
- callbacks
Callbacks indexed by event name
- deprecated
Indicates whether this endpoint is deprecated or not
- description
Detailed description
- operationId
A unique identifier which identifies this operation
- summary
Short description
- tags
OpenAPI tags
- Inherited from:
- EndpointsWithCustomErrors
Extension methods for Endpoint.
Extension methods for Endpoint.
- Inherited from:
- EndpointsWithCustomErrors
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.
- Inherited from:
- InvariantFunctorSyntax
- Inherited from:
- PartialInvariantFunctorSyntax
Trait that indicates how a response should be interpreted
Trait that indicates how a response should be interpreted
- Inherited from:
- EndpointsWithCustomErrors
Inherited types
Callbacks indexed by URL pattern
Callbacks indexed by URL pattern
- See also:
Swagger Documentation at https://swagger.io/docs/specification/callbacks/
- Inherited from:
- EndpointsWithCustomErrors
a query string parameter can have zero or several values
a query string parameter can have zero or several values
- Inherited from:
- Urls
A function that takes an A
information and returns a SttpRequest
A function that takes an A
information and returns a SttpRequest
- Inherited from:
- EndpointsWithCustomErrors
A function that, given an A
information and a SttpRequest
, eventually returns a SttpRequest
A function that, given an A
information and a SttpRequest
, eventually returns a SttpRequest
- Inherited from:
- EndpointsWithCustomErrors
A function that, given an A
and a request model, returns an updated request
containing additional headers
A function that, given an A
and a request model, returns an updated request
containing additional headers
- Inherited from:
- EndpointsWithCustomErrors
Value members
Inherited methods
- Definition Classes
- Inherited from:
- EndpointsWithCustomErrors
- Definition Classes
- Inherited from:
- EndpointsWithCustomErrors
- Definition Classes
- Inherited from:
- EndpointsWithCustomErrors
Bad Request (400) response, with an entity of type ClientErrors
.
Bad Request (400) response, with an entity of type ClientErrors
.
- See also:
- Inherited from:
- Responses
- Inherited from:
- Urls
Helper method to perform DELETE request
Helper method to perform DELETE request
- Type parameters:
- HeadersP
Payload carried by headers
- UrlP
Payload carried by url
- Inherited from:
- Requests
Successfully decodes no information from a response
Successfully decodes no information from a response
- Inherited from:
- EndpointsWithCustomErrors
Helper method to perform GET request
Helper method to perform GET request
- Type parameters:
- HeadersP
Payload carried by headers
- UrlP
Payload carried by url
- Inherited from:
- Requests
Internal Server Error (500) response, with an entity of type ServerError
.
Internal Server Error (500) response, with an entity of type ServerError
.
- See also:
- Inherited from:
- Responses
- Definition Classes
- Inherited from:
- EndpointsWithCustomErrors
- Definition Classes
- Inherited from:
- EndpointsWithCustomErrors
- Definition Classes
- Inherited from:
- EndpointsWithCustomErrors
OK (200) Response with the given entity
OK (200) Response with the given entity
- Inherited from:
- Responses
- Inherited from:
- EndpointsWithCustomErrors
Helper method to perform PATCH request
Helper method to perform POST request
- Inherited from:
- EndpointsWithCustomErrors
Successfully decodes string information from a response
Successfully decodes string information from a response
- Inherited from:
- EndpointsWithCustomErrors
- Inherited from:
- Urls
Turns a Response[A]
into a Response[Option[A]]
.
Turns a Response[A]
into a Response[Option[A]]
.
Interpreters represent None
with
an empty HTTP response whose status code is 404 (Not Found).
- Inherited from:
- Responses
Inherited fields
Response used by endpoints4s when decoding a request fails.
Response used by endpoints4s when decoding a request fails.
The provided implementation forwards to badRequest
.
- Inherited from:
- Errors
An empty path.
An empty path.
Useful to begin a path definition:
path / "foo" / segment[Int] /? qs[String]("bar")
- Inherited from:
- Urls
Response used by endpoints4s when the business logic of an endpoint fails.
Response used by endpoints4s when the business logic of an endpoint fails.
The provided implementation forwards to internalServerError
- Inherited from:
- Errors
Implicits
Inherited implicits
Extension methods for Endpoint.
Extension methods for Endpoint.
- Inherited from:
- EndpointsWithCustomErrors
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.
- Inherited from:
- InvariantFunctorSyntax
- Inherited from:
- PartialInvariantFunctorSyntax
- Inherited from:
- SemigroupalSyntax
Query string parameter containing a Boolean
value
Query string parameter containing a Boolean
value
- Inherited from:
- Urls
Codec for query string parameters of type Double
Codec for query string parameters of type Double
- Inherited from:
- Urls
Ability to define Int
query string parameters
Ability to define Int
query string parameters
- Inherited from:
- Urls
Query string parameter containing a Long
value
Query string parameter containing a Long
value
- Inherited from:
- Urls
- Inherited from:
- Urls
- Inherited from:
- Urls
Ability to define UUID
query string parameters
Ability to define UUID
query string parameters
- Inherited from:
- Urls