HTTP client built on existing TRequest / TResponse
Goal
Add an HTTP client implementation to coroio_http, reusing the existing TRequest / TResponse types and HTTP parsing/formatting logic.
Avoid introducing a parallel client-only API.
Design outline
- HTTP client lives in the same
http library as the server.
- Client and server share:
- request/response types
- header parsing/serialization
- body reading/writing logic
- Client uses the same async/poller infrastructure as the server.
- API should feel symmetrical to server-side handling.
Checklist
Core HTTP client
Transport / protocol
API shape
Validation
Non-goals
- HTTP/2 or TLS
- Automatic redirects
- Cookie or proxy support
HTTP client built on existing TRequest / TResponse
Goal
Add an HTTP client implementation to
coroio_http, reusing the existingTRequest/TResponsetypes and HTTP parsing/formatting logic.Avoid introducing a parallel client-only API.
Design outline
httplibrary as the server.Checklist
Core HTTP client
TRequestfor request constructionTResponsefor response parsing and body readingTransport / protocol
Content-LengthTransfer-Encoding: chunkedConnection: closevs keep-aliveAPI shape
THttpClient)co_await client.Do(request)or similar)std::functionin hot pathsValidation
THttpServer)Non-goals