HTTP client — application to external API

A handler and CLI share a reusable client and the same request-builder API

HTTP client — application to external API A handler and CLI share a reusable client and the same request-builder API server handler · DI client · Application process server handler DI client CLI · batch · reused client · Application process CLI · batch reused client HTTP client · reusable · Application process HTTP client reusable request builder · same API · Application process request builder same API connection pool · owned by client · Application process connection pool owned by client external HTTP API · Architecture component external HTTP API DI reuse create submit owns HTTP request HTTP response Application process

One reusable client

  • • A server handler receives the reusable HTTP client through DI; a CLI or batch process stores it directly.
  • • The client owns the common request-builder API and connection pool used to exchange requests and responses with the external HTTP API.