HTTP URL path segment associated with REST method annotated with this tag.
HTTP URL path segment associated with REST method annotated with this tag. This path may be multipart
(i.e. contain slashes). It may also be empty which means that this particular REST method does not contribute
anything to URL path. Any special characters will be URL-encoded when creating HTTP request.
If path is not specified explicitly, method name is used (the actual method name, not rpcName
).
trait SomeRestApi { @GET("users/find") def findUser(userId: String): Future[User] } object SomeRestApi extends RestApiCompanion[SomeRestApi]
Base trait for tag annotations that determine how a REST method is translated into actual HTTP request. A REST method may be annotated with one of HTTP method tags (GET, PUT, POST, PATCH, DELETE) which means that this method represents actual HTTP call and is expected to return a
Future[Result]
whereResult
is encodable as RestResponse.If a REST method is not annotated with any of HTTP method tags, Prefix is assumed by default which means that this method only contributes to URL path, HTTP headers and query parameters but does not yet represent an actual HTTP request. Instead, it is expected to return some other REST API trait.