Package com.sun.jersey.api.client.WebResource

Examples of com.sun.jersey.api.client.WebResource.Builder


    Client client = Client.create();

    WebResource webResource = client.resource(uri);

    Builder builder = webResource.accept(MediaType.APPLICATION_JSON);
    ClientResponse response = null;
    if (Method.GET.equals(method)) {
      response = builder.get(ClientResponse.class);
    } else if (Method.POST.equals(method)) {
      response = builder.post(ClientResponse.class);
    }
   
//    System.out.println("DEBUG data=" + data);
//    System.out.println("DEBUG response=" + response.toString());
//    System.out.println("DEBUG response headers=" + response.getHeaders().toString());
View Full Code Here

TOP

Related Classes of com.sun.jersey.api.client.WebResource.Builder

Copyright © 2018 www.massapicom. 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.