> For the complete documentation index, see [llms.txt](https://tech.x2bee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tech.x2bee.com/dev-guide/developer-guide-en/dev-start/markdown/implementing-an-http-interface.md).

# Implementing an HTTP Interface

Spring 6.0 (Spring Boot 3.0) introduced HTTP Interface for REST API communication. It is similar to FeignClient and uses WebClient internally.

* Spring 3.0: `RestTemplate` (not recommended for new projects)
* Spring 5.0: WebFlux `WebClient`
* Spring 6.0: HTTP Interface

Register a WebClient-backed interface as a Bean with `HttpServiceProxyFactory`, then define endpoints with `@GetExchange`, `@PostExchange`, `@PutExchange`, `@PatchExchange`, and `@DeleteExchange`.

X2BEE provides the `HttpExchangeInterface` custom annotation with `baseUrl`, `defaultPath`, `responseTimeoutSeconds`, `connectionTimeoutSeconds`, `enableTokenAuth`, and `useMemberToken`.

Preserve the source Java examples, endpoint paths, annotations, headers, request parameters, response types, and class names when applying this guide.
