Examples of header()


Examples of org.gwt.mosaic.ui.client.table.RowValue.ColumnDefinition.header()

      ColumnDefinition annotation = method.getAnnotation(RowValue.ColumnDefinition.class);
      String methodName = method.getName();
      String returnType = method.getReturnType().getSimpleSourceName();
      if (returnType.equals(String.class.getSimpleName())) {
        srcWriter.println("addColumnDefinition(new TextColumnDefinition<"
            + rowValue.getSimpleSourceName() + ">(\"" + annotation.header()
            + "\"," + annotation.sortable() + "," + annotation.filterable()
            + "," + annotation.editable() + ") {");
        srcWriter.indent();
        srcWriter.println("public String getCellValue("
            + rowValue.getSimpleSourceName() + " value) {");
View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest.header()

      Customer cust = response.getEntity();

      String etag = response.getHeaders().getFirst("ETag");
      System.out.println("Doing a conditional GET with ETag: " + etag);
      request.clear();
      request.header("If-None-Match", etag);
      response = request.get(Customer.class);
      Assert.assertEquals(304, response.getStatus());

      // Update and send a bad etag with conditional PUT
      cust.setCity("Bedford");
View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest.header()

      Assert.assertEquals(304, response.getStatus());

      // Update and send a bad etag with conditional PUT
      cust.setCity("Bedford");
      request.clear();
      request.header("If-Match", "JUNK");
      request.body("application/xml", cust);
      ClientResponse response2 = request.put();
      Assert.assertEquals(412, response2.getStatus());
   }
}
View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest.header()

      DKIMSignature contentSignature = new DKIMSignature();
      contentSignature.setSelector("test");
      contentSignature.setDomain("samplezone.org");
      request.getAttributes().put(KeyRepository.class.getName(), repository);

      request.header(DKIMSignature.DKIM_SIGNATURE, contentSignature);
      request.body("text/plain", "hello world");
      ClientResponse response = request.post();
      Assert.assertEquals(204, response.getStatus());

View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest.header()

      DKIMSignature contentSignature = new DKIMSignature();
      contentSignature.setSelector("test1");
      contentSignature.setDomain("samplezone.org");
      request.getAttributes().put(KeyRepository.class.getName(), clientRepository);

      request.header(DKIMSignature.DKIM_SIGNATURE, contentSignature);
      request.body("text/plain", "hello world");
      ClientResponse response = request.post();
      Assert.assertEquals(204, response.getStatus());

View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest.header()

      ClientRequest request = new ClientRequest(TestPortProvider.generateURL("/signed"));
      DKIMSignature contentSignature = new DKIMSignature();
      contentSignature.setSelector("test1");
      contentSignature.setDomain("samplezone.org");
      contentSignature.setPrivateKey(badKey);
      request.header(DKIMSignature.DKIM_SIGNATURE, contentSignature);
      request.body("text/plain", "hello world");
      ClientResponse response = request.post();
      Assert.assertEquals(401, response.getStatus());
   }
View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest.header()

      DKIMSignature contentSignature = new DKIMSignature();
      contentSignature.setSelector("bill");
      contentSignature.setDomain("client.com");
      request.getAttributes().put(KeyRepository.class.getName(), repository);

      request.header(DKIMSignature.DKIM_SIGNATURE, contentSignature);
      request.body("text/plain", "hello world");
      ClientResponse response = request.post();
      Assert.assertEquals(204, response.getStatus());

View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest.header()

   protected ClientRequest createRequest(Object[] args)
   {
      ClientRequest request = new ClientRequest(uri, executor, providerFactory);
      request.getAttributes().putAll(attributes);
      if (accepts != null) request.header(HttpHeaders.ACCEPT, accepts.toString());
      this.copyClientInterceptorsTo(request);

      boolean isClientResponseResult = ClientResponse.class.isAssignableFrom(method.getReturnType());
      request.followRedirects(!isClientResponseResult || this.followRedirects);
View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest.header()

      {
         cache.remove(request.getUri(), entry.getMediaType());
         BrowserCache.Header[] headers = entry.getValidationHeaders();
         for (BrowserCache.Header header : headers)
         {
            request.header(header.getName(), header.getValue());
         }
         return handleExpired(ctx, request, entry);
      }

      return createClientResponse(request, entry);
View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest.header()

    */
   @Test
   public void testNullJaxb() throws Exception
   {
      ClientRequest request = new ClientRequest("http://localhost:9095/my/null");
      request.header("Content-Length", "0");
      request.header("Content-Type", "application/xml");
      ClientResponse res = request.post();
      Assert.assertEquals(204, res.getStatus());
   }
}
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.