Package javax.ws.rs.client.Invocation

Examples of javax.ws.rs.client.Invocation.Builder.accept()


        checkNull(link);
        checkClosed();
        Builder builder = target(link.getUriBuilder()).request();
        String type = link.getType();
        if (type != null) {
            builder.accept(type);
        }
        return builder;
    }

    @Override
View Full Code Here


      di.setDeploymentName("validate");
      di.setContextPath("/validate");
      server.deploy(di);
      Client client = ClientBuilder.newClient();
      Builder builder = client.target(TestPortProvider.generateURL("/validate/all/a/b/c")).request();
      builder.accept(MediaType.APPLICATION_XML);
      Response response = builder.get();
      Object header = response.getHeaders().getFirst(Validation.VALIDATION_HEADER);
      Assert.assertTrue(header instanceof String);
      Assert.assertTrue(Boolean.valueOf(String.class.cast(header)));
      ViolationReport report = response.readEntity(ViolationReport.class);
View Full Code Here

      di.setDeploymentName("validate");
      di.setContextPath("/validate");
      server.deploy(di);
      Client client = ClientBuilder.newClient();
      Builder builder = client.target(TestPortProvider.generateURL("/validate/all/aa/bbb/cccc")).request();
      builder.accept(MediaType.APPLICATION_XML);
      Response response = builder.get();
      Object header = response.getHeaders().getFirst(Validation.VALIDATION_HEADER);
      Assert.assertTrue(header instanceof String);
      Assert.assertTrue(Boolean.valueOf(String.class.cast(header)));
      ViolationReport report = response.readEntity(ViolationReport.class);
View Full Code Here

      di.setDeploymentName("validate");
      di.setContextPath("/validate");
      server.deploy(di);
      Client client = ClientBuilder.newClient();
      Builder builder = client.target(TestPortProvider.generateURL("/validate/all/a/b/c")).request();
      builder.accept(MediaType.APPLICATION_XML);
      Response response = builder.get();
      Object header = response.getHeaders().getFirst(Validation.VALIDATION_HEADER);
      Assert.assertTrue(header instanceof String);
      Assert.assertTrue(Boolean.valueOf(String.class.cast(header)));
      ViolationReport report = response.readEntity(ViolationReport.class);
View Full Code Here

      di.setDeploymentName("validate");
      di.setContextPath("/validate");
      server.deploy(di);
      Client client = ClientBuilder.newClient();
      Builder builder = client.target(TestPortProvider.generateURL("/validate/all/aa/bbb/cccc")).request();
      builder.accept(MediaType.APPLICATION_XML);
      Response response = builder.get();
      Object header = response.getHeaders().getFirst(Validation.VALIDATION_HEADER);
      Assert.assertTrue(header instanceof String);
      Assert.assertTrue(Boolean.valueOf(String.class.cast(header)));
      ViolationReport report = response.readEntity(ViolationReport.class);
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.