THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
1 ClientConfig config = new ClientConfig();
// Create new JAX-RS Application
2 config.handlers(new DummyHandler());
// create the rest client instance
3 RestClient client = new RestClient(config);
// create the resource instance to interact with
4 Resource resource = client.resource("http://services.com/HelloWorld");
// perform a GET on the resource
// the resource will be returned as plain text
5 String response = resource.accept("text/plain").get(String.class);
|
...