Package google.registry.tools
Class ServiceConnection
java.lang.Object
google.registry.tools.ServiceConnection
An HTTP connection to a service.
By default - connects to the TOOLS service. To create a Connection to another service, call
the withService(google.registry.request.Action.Service, boolean)
function.
-
Method Summary
Modifier and TypeMethodDescriptionstatic URL
getServer
(Action.Service service) sendGetRequest
(String endpoint, Map<String, ?> params) sendPostRequest
(String endpoint, Map<String, ?> params, com.google.common.net.MediaType contentType, byte[] payload) withService
(Action.Service service, boolean isCanary) Returns a copy of this connection that talks to a different service endpoint.
-
Method Details
-
withService
Returns a copy of this connection that talks to a different service endpoint. -
sendPostRequest
public String sendPostRequest(String endpoint, Map<String, ?> params, com.google.common.net.MediaType contentType, byte[] payload) throws IOException- Throws:
IOException
-
sendGetRequest
- Throws:
IOException
-
sendJson
- Throws:
IOException
-
getServer
-