Interface HttpClientProvider


@DoNotInherit public interface HttpClientProvider
Not for user extension, instances are available through injection in selected component types.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    httpClientFor(String serviceName)
    Returns a HttpClient to interact with the specified HTTP service.
  • Method Details Link icon

    • httpClientFor Link icon

      HttpClient httpClientFor(String serviceName)
      Returns a HttpClient to interact with the specified HTTP service.

      If the serviceName is a service name without protocol or domain the client will be configured to connect to another service deployed with that name on the same Akka project. The runtime will take care of routing requests to the service and keeping the data safe by encrypting the connection between services and identifying the client as coming from this service.

      If it is a full dns name prefixed with "http://" or "https://" it will connect to services available on the public internet.