package com.codename1.annotations.rest
Annotations for declaring type safe REST clients.
An interface is marked with RestClient and its methods describe HTTP
requests using the verb annotations GET, POST, PUT, PATCH and
DELETE. Request data is bound through Path, Query, Header, Cookie
and Body. These annotations are processed to generate the concrete REST
client implementation.
Types
annotation Body | Marks an interface method parameter as the request body. |
annotation Cookie | Binds an interface method parameter to a Cookie request-header entry. |
annotation DELETE | HTTP DELETE request. |
annotation GET | HTTP GET request. |
annotation Header | Binds an interface method parameter to an HTTP request header. |
annotation PATCH | HTTP PATCH request. |
annotation POST | HTTP POST request. |
annotation PUT | HTTP PUT request. |
annotation Path | Binds an interface method parameter to a {name} placeholder in the URL path declared on the verb annotation. |
annotation Query | Binds an interface method parameter to a URL query-string entry. |
annotation RestClient | Marks an interface as a REST client that the build-time annotation processor wires up to a generated network implementation. |