# Package com.codename1.annotations.rest

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.

- Related Packages
  Package
  Description
  com.codename1.annotations
  Codename One specific Java annotations used by the build pipeline and the ParparVM bytecode translator to mark methods and classes for special treatment -- e.g.
  com.codename1.annotations.graphql
  Annotations for declaring type safe GraphQL clients.
  com.codename1.annotations.grpc
  gRPC-Web client annotations.
- Annotation Types
  Class
  Description
  Body
  Marks an interface method parameter as the request body.
  Cookie
  Binds an interface method parameter to a `Cookie` request-header entry.
  DELETE
  HTTP `DELETE` request.
  GET
  HTTP `GET` request.
  Header
  Binds an interface method parameter to an HTTP request header.
  PATCH
  HTTP `PATCH` request.
  Path
  Binds an interface method parameter to a `{name}` placeholder in the URL path declared on the verb annotation.
  POST
  HTTP `POST` request.
  PUT
  HTTP `PUT` request.
  Query
  Binds an interface method parameter to a URL query-string entry.
  RestClient
  Marks an interface as a REST client that the build-time annotation processor wires up to a generated network implementation.