Interface HttpClientRegistry
@Beta
public interface HttpClientRegistry
Contains a bucket of configured
HttpClients for use within an extension.
There are two categories of HttpClients, one for internal Spinnaker services, and another for extension-defined http clients.
-
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(String name, String baseUrl, HttpClientConfig config) Configure a new externalHttpClient.Get an extension-definedHttpClientby name.getInternalService(String name) Get an internal Spinnaker serviceHttpClient.
-
Method Details
-
get
Get an extension-definedHttpClientby name.The client must first be configured before it can be retrieved from the registry.
- Parameters:
name- The name of the HttpClient- Returns:
- The configured HttpClient
-
getInternalService
Get an internal Spinnaker serviceHttpClient.- Parameters:
name- The name of the Spinnaker service you want to talk to- Returns:
- The internal service client
-
configure
Configure a new externalHttpClient.An HttpClient must be configured prior to being used.
- Parameters:
name- A unique name for the client, scoped within an extensionbaseUrl- The base URL of the HTTP clientconfig- Additional configuration for the client
-