Package akka.javasdk.http
Interface HttpClientProvider
@DoNotInherit
public interface HttpClientProvider
Not for user extension, instances are available through injection in selected component types.
-
Method Summary
Modifier and TypeMethodDescriptionhttpClientFor
(String serviceName) Returns aHttpClient
to interact with the specified HTTP service.
-
Method Details
-
httpClientFor
Returns aHttpClient
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.
-