Package com.sun.jersey.api.client

Examples of com.sun.jersey.api.client.WebResource.uri()


        ClientResponse createResponse = webResource.path("/").type(MediaType.APPLICATION_JSON).entity(testResource).post(ClientResponse.class);

        Assert.assertEquals(201, createResponse.getStatus());
        Assert.assertEquals(testResource, createResponse.getEntity(JsonNode.class));

        JsonNode testResourceFromServer = webResource.uri(createResponse.getLocation()).accept(MediaType.APPLICATION_JSON).get(JsonNode.class);
        Assert.assertEquals(testResource, testResourceFromServer);
    }


}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.