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 annotations representing HTTP methods which may define a HTTP body. This includes PUT, POST, PATCH and DELETE. Parameters of REST methods annotated with one of these tags are by default serialized into JSON (through encoding to JsonValue) and combined into JSON object that is sent as HTTP body.
Parameters may also contribute to URL path, HTTP headers and query parameters if annotated as Path, Header or Query.
REST method may also take a single parameter representing the entire HTTP body. Such parameter must be annotated as Body and must be the only body parameter of that method. Value of this parameter will be encoded as HttpBody which doesn't necessarily have to be JSON (it may define its own MIME type).