Class HttpResourcesUtils
java.lang.Object
software.amazon.awssdk.regions.util.HttpResourcesUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic HttpResourcesUtils
instance()
readResource
(URI endpoint) Connects to the given endpoint to read the resource and returns the text contents.readResource
(ResourcesEndpointProvider endpointProvider) Connects to the given endpoint to read the resource and returns the text contents.readResource
(ResourcesEndpointProvider endpointProvider, String method) Connects to the given endpoint to read the resource and returns the text contents.
-
Method Details
-
instance
-
readResource
Connects to the given endpoint to read the resource and returns the text contents. If the connection fails, the request will not be retried.- Parameters:
endpoint
- The service endpoint to connect to.- Returns:
- The text payload returned from the container metadata endpoint service for the specified resource path.
- Throws:
IOException
- If any problems were encountered while connecting to the service for the requested resource path.SdkClientException
- If the requested service is not found.
-
readResource
Connects to the given endpoint to read the resource and returns the text contents.- Parameters:
endpointProvider
- The endpoint provider.- Returns:
- The text payload returned from the container metadata endpoint service for the specified resource path.
- Throws:
IOException
- If any problems were encountered while connecting to the service for the requested resource path.SdkClientException
- If the requested service is not found.
-
readResource
public String readResource(ResourcesEndpointProvider endpointProvider, String method) throws IOException Connects to the given endpoint to read the resource and returns the text contents.- Parameters:
endpointProvider
- The endpoint provider.method
- The HTTP request method to use.- Returns:
- The text payload returned from the container metadata endpoint service for the specified resource path.
- Throws:
IOException
- If any problems were encountered while connecting to the service for the requested resource path.SdkClientException
- If the requested service is not found.
-