New posts

This commit is contained in:
2026-11-06 21:44:06 +05:30
parent dc13293046
commit 8da3374155
51 changed files with 2099 additions and 0 deletions
@@ -0,0 +1,38 @@
# groups the HttpServiceProxyRegistry knows about
group apikey -> [ApiKeyClient]
group bearer -> [SecureClient]
group flaky -> [FlakyClient]
group github -> [GitHubClient]
group oauth -> [OAuthClient]
group posts -> [ParamsClient, PostClient]
group resilient -> [ResilientClient]
PostClient bean is a JDK proxy: true
registry.getClient("posts", PostClient.class) is the injected bean: true
# CRUD against the stub (every call is a real HTTP request)
findAll() -> 3 posts
findById(1) -> Post[id=1, userId=1, title=First post, body=Body of the first post]
findByUser(2) -> [3]
findEntity(2) -> status 200 OK, Content-Type application/json
create(...) -> id 101
update(1, ...) -> title 'Updated Title'
delete(1) -> void, no exception
# argument kinds (ParamsClient)
@RequestHeader -> upstream saw X-Correlation-Id=abc-123
@RequestParam(required=false), null -> 3 posts
@RequestParam(defaultValue="2") -> posts [3]
URI argument -> Second post
# what the stub actually received
GET /posts
GET /posts/1
GET /posts?userId=2
GET /posts/2
POST /posts
PUT /posts/1
DELETE /posts/1
GET /echo/headers
GET /posts
GET /posts?userId=2
GET /posts/2