Skip to content
Skills Library
Programming · Building & coding

http-interface-clients

/http-interface-clients

Use when calling external HTTP APIs from Spring Boot 3 / Spring Framework 6 with declarative HttpExchange interfaces. Covers manual proxy registration, RestClient versus WebClient, and timeout and error handling conventions.

Licence
MIT
Last repository change
22.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
4
Scripts
2
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 22.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 2 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: examples/bad-order-client.java, examples/good-order-client.java

What it does and when to use it

Use when calling external HTTP APIs from Spring Boot 3 / Spring Framework 6 with declarative HttpExchange interfaces. Covers manual proxy registration, RestClient versus WebClient, and timeout and error handling conventions.

Original author description

Use when calling external HTTP APIs from Spring Boot 3 / Spring Framework 6 with declarative HttpExchange interfaces. Covers manual proxy registration, RestClient versus WebClient, and timeout and error handling conventions.

How it works

  1. Gotchas
Original SKILL.md headings · 39 lines, 194 words
SKILL.md preview
---
name: http-interface-clients
description: >
  Use when calling external HTTP APIs from Spring Boot 3 / Spring Framework 6 with declarative
  HttpExchange interfaces. Covers manual proxy registration, RestClient versus WebClient, and
  timeout and error handling conventions.
---

# Declarative HTTP Interface Clients (Boot 3)

Spring Framework 6 supports `@HttpExchange` interfaces, but Boot 3 does not provide Boot 4's
`@ImportHttpServices` group auto-registration. Build the client adapter explicitly.

```java
@HttpExchange("/orders")
interface OrderApiClient {
    @GetExchange("/{id}")
    OrderDto get(@PathVariable UUID id);
}

@Configuration
class ClientConfig {
    @Bean
    OrderApiClient orderApiClient(RestClient.Builder builder,
                                  @Value("${clients.orders.base-url}") String baseUrl) {
        RestClient client = builder.baseUrl(baseUrl).build();
        HttpServiceProxyFactory factory =
            HttpServiceProxyFactory.builderFor(RestClientAdapter.create(client)).build();
        return factory.createClient(OrderApiClient.class);
    }
}
```

Use `WebClientAdapter` for reactive interfaces returning `Mono` or `Flux`. Configure base URLs,
timeouts, authentication, and error translation in the client adapter layer rather than in
controllers or domain services. Prefer one factory/configurer per external service.

## Gotchas

- Agent uses `@ImportHttpServices` - that Boot 4 registration API is not available in Boot 3.
- Agent adds `@Component` or an implementation to the interface - register the generated proxy as a bean.
- Agent uses `RestClient` for `Mono` or `Flux` - use `WebClientAdapter` for reactive return types.
- Agent hard-codes remote hosts in annotations - keep URLs in configuration.
- Agent lets transport errors leak through the domain - translate them in the client adapter.
- Agent creates a new client per request - configure and reuse a singleton proxy.
Files in this package (4)
  • SKILL.md 2 KB
  • agents/openai.yaml 1 KB
  • examples/bad-order-client.java 1 KB
  • examples/good-order-client.java 1 KB

Versions

RepositoryScoreLicence
This page · rrezartprebreza/spring-boot-skills100MIT
rrezartprebreza/spring-boot-skills100MIT

Database snapshot: 13.11.2026 · package version 3ad62f2c57cf (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100spring-testing-http-client
    Test outbound HTTP client code in Spring Boot apps - RestClient, HTTP interface clients (@HttpExchange), RestTemplate - with MockRestServiceServer, @RestClientTest, or a stub HTTP server. Use when testing code that calls a third-party or remote API: the request it sends, how it…
  • 100spring-cloud-openfeign
    Declarative HTTP client for microservices communication with Spring Cloud OpenFeign. Covers @FeignClient, error handling, interceptors, and circuit breaker integration. USE WHEN: user mentions "feign", "openfeign", "@FeignClient", "declarative HTTP client", "service-to-service…
  • 100spring-web
    Spring Web MVC advanced for Spring Boot 3.x. Covers RestClient (Spring 6.1+), WebClient, ResponseEntity patterns, interceptors, content negotiation, file upload/download, streaming responses, and custom argument resolvers. USE WHEN: user mentions "spring web", "RestClient",…
  • 100spring-boot-web-api
    Spring Boot 4 REST API implementation patterns. Use when creating REST controllers, REST endpoints, request validation, exception handlers with ProblemDetail (RFC 9457), API versioning, content negotiation, WebFlux reactive endpoints, HTTP clients with @HttpExchange, JSON…
  • 95restclient-migration
    Migrate RestTemplate to RestClient in Spring Boot 3.2+. Use when replacing deprecated RestTemplate with modern fluent API, updating HTTP client code, or configuring RestClient beans. Covers GET/POST/DELETE migrations, error handling, and ParameterizedTypeReference usage.
  • 100spring-boot-expert
    Expert-level Spring Boot, Spring Framework, REST APIs, and microservices development. Use when the user mentions Java, Spring framework, REST APIs, or microservices, or when the task involves Spring Boot Fundamentals.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.