Examples of addHeader()


Examples of com.lowagie.text.Document.addHeader()

      document.addTitle("Hello World example");
            document.addAuthor("Bruno Lowagie");
            document.addSubject("This example explains step 3 in Chapter 1");
            document.addKeywords("Metadata, iText, step 3, tutorial");
            // custom (HTML) meta information
            document.addHeader("Expires", "0");
            // meta information that will be in a comment section in HTML
            document.addCreator("My program using iText");
      document.open();
      // step 4: we add a paragraph to the document
      document.add(new Paragraph("Hello World"));
View Full Code Here

Examples of com.lowagie.text.LwgDocument.addHeader()

      document.addTitle("Hello World example");
            document.addAuthor("Bruno Lowagie");
            document.addSubject("This example explains step 3 in Chapter 1");
            document.addKeywords("Metadata, iText, step 3, tutorial");
            // custom (HTML) meta information
            document.addHeader("Expires", "0");
            // meta information that will be in a comment section in HTML
            document.addCreator("My program using iText");
      document.open();
      // step 4: we add a paragraph to the document
      document.add(new Paragraph("Hello World"));
View Full Code Here

Examples of com.mockrunner.mock.web.MockHttpServletRequest.addHeader()

        getContext().setRealPath(source, target);
    }

    public void addHeader(String headerName, String headerValue) {
        MockHttpServletRequest request = (MockHttpServletRequest)getFactory().getWrappedRequest();
        request.addHeader(headerName, headerValue);
        getFactory().addRequestWrapper(request);
    }

    public void setMethod(String method) {
        MockHttpServletRequest request = (MockHttpServletRequest)getFactory().getWrappedRequest();
View Full Code Here

Examples of com.ning.http.client.AsyncHttpClient.BoundRequestBuilder.addHeader()

                }
              }//TESTED (1.5, 1.6, 3.*, 4.*)
              if (null != request.httpFields) {
                for (Map.Entry<String, String> keyValue: request.httpFields.entrySet()) {
                  if (!keyValue.getKey().equalsIgnoreCase("content")) {
                    asyncRequest = asyncRequest.addHeader(keyValue.getKey(), keyValue.getValue().replace("$1", entityValue));
                  }
                }             
              }//TESTED (by hand, "http://httpbin.org/cookies", "httpFields": { "Cookie": "mycookie=test" }
              if (null != postContent) {
                asyncRequest = asyncRequest.setBody(postContent.replace("$1", entityValue));
View Full Code Here

Examples of com.ning.http.client.RequestBuilder.addHeader()

        MultivaluedMap<String, String> headers = cr.getHeaders();
        for (String header : headers.keySet()) {
            List<String> values = headers.get(header);
            for (String value : values) {
                if (value != null) {
                    builder.addHeader(header, value);
                }
            }
        }

        if (method.equalsIgnoreCase("PUT") || method.equalsIgnoreCase("POST")) {
View Full Code Here

Examples of com.pugh.sockso.web.Response.addHeader()

    private void sendHeaders() {

        final Response res = getResponse();
        final String filename = "playlist." +extension;
       
        res.addHeader( "Content-type", Files.getMimeType(filename) );
        res.addHeader( "Content-Disposition", "inline; filename=\"" +filename+ "\"" );
        res.addHeader( "Expires", "0" );
        res.addHeader( "Cache-Control", "must-revalidate, post-check=0, pre-check=0" );
        res.addHeader( "Pragma", "nocache" );
View Full Code Here

Examples of com.ramforth.webserver.http.HttpHeaders.addHeader()

    public IHttpHeaders parse(InputStream is) {
        IHttpHeaders httpHeaders = new HttpHeaders();

        IHttpHeader header;
        while ((header = parseHeader(is)) != null) {
            httpHeaders.addHeader(header);
        }

        return httpHeaders;
    }
View Full Code Here

Examples of com.ramforth.webserver.http.IHttpHeaders.addHeader()

    public IHttpHeaders parse(InputStream is) {
        IHttpHeaders httpHeaders = new HttpHeaders();

        IHttpHeader header;
        while ((header = parseHeader(is)) != null) {
            httpHeaders.addHeader(header);
        }

        return httpHeaders;
    }
View Full Code Here

Examples of com.squareup.okhttp.mockwebserver.MockResponse.addHeader()

            String expectedMd5 = request.getHeader("Content-MD5");
            ByteSource body = ByteSource.wrap(request.getBody());
            String realMd5FromRequest = base64().encode(body.hash(md5()).asBytes());
            boolean matched = expectedMd5.equals(realMd5FromRequest);
            if (matched) {
               response.addHeader("x-Content-MD5", realMd5FromRequest);
            } else {
               response.setResponseCode(500);
            }
            return response;
         } catch (IOException ex) {
View Full Code Here

Examples of com.sun.grizzly.tcp.Response.addHeader()

        Response response = task.getRequest().getResponse();

        if ( task.getRequest().requestURI().toString().endsWith( GRAPHML_SUFFIX ) )
        {
            response.addHeader( CONTENT_DISPOSITION, ATTACHMENT_DISPOSITION );
        }

        // Pass execution onwards
        task.invokeAdapter();
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.