Examples of header()


Examples of org.atmosphere.wasync.RequestBuilder.header()

            final AsyncHttpClient c = new AsyncHttpClient(b.setAsyncHttpClientProviderConfig(nettyConfig).build());
            Client client = ClientFactory.getDefault().newClient();
            RequestBuilder request = client.newRequestBuilder();
            request.method(Request.METHOD.GET).uri(url);
            request.transport(Request.TRANSPORT.WEBSOCKET);
            request.header("X-wakeUpNIO", "true");

            final CountDownLatch l = new CountDownLatch(clientNum);
            final CountDownLatch messages = new CountDownLatch(messageNum * clientNum);
            long clientCount = l.getCount();
            final AtomicLong total = new AtomicLong(0);
View Full Code Here

Examples of org.eclipse.jetty.client.HttpRequest.header()

        jettyRequest.getHeaders().remove(HttpHeader.USER_AGENT);

        jettyRequest.method(finalRequest.getMethod());

        for (Entry<String, String> entry : finalRequest.getHeaders().entries()) {
            jettyRequest.header(entry.getKey(), entry.getValue());
        }

        BodyGenerator bodyGenerator = finalRequest.getBodyGenerator();
        if (bodyGenerator != null) {
            if (bodyGenerator instanceof StaticBodyGenerator) {
View Full Code Here

Examples of org.eclipse.jetty.client.api.Request.header()

      }

      for (Enumeration<String> headerValues = request.getHeaders(headerName); headerValues.hasMoreElements(); ) {
        String headerValue = headerValues.nextElement();
        if (headerValue != null) {
          proxyRequest.header(headerName, headerValue);
        }
      }
    }

    // Add proxy headers
View Full Code Here

Examples of org.encog.util.HTMLReport.header()

    report.endTable();

    report.h1("Field Ranges");
    report.beginTable();
    report.beginRow();
    report.header("Name");
    report.header("Class?");
    report.header("Complete?");
    report.header("Int?");
    report.header("Real?");
    report.header("Max");
View Full Code Here

Examples of org.fusesource.mqtt.codec.MQTTFrame.header()

        return unmarshal(dis);
    }

    public void marshal(Object command, DataOutput dataOut) throws IOException {
        MQTTFrame frame = (MQTTFrame) command;
        dataOut.write(frame.header());

        int remaining = 0;
        for (Buffer buffer : frame.buffers) {
            remaining += buffer.length;
        }
View Full Code Here

Examples of org.fusesource.restygwt.client.Method.header()

        {
            // Add the security token as header
            String cookieContent = securityCookieAccessor.getCookieContent();
            if (cookieContent != null)
            {
                result = result.header(securityCookieName, cookieContent);
            }
        }
        return result;
    }
View Full Code Here

Examples of org.geowebcache.io.XMLBuilder.header()

    private String generateGetCapabilities(Charset encoding) {
        StringBuilder str = new StringBuilder();
        XMLBuilder xml = new XMLBuilder(str);
       
        try {
            xml.header("1.0", encoding);
            xml.indentElement("Capabilities");
            xml.attribute("xmlns", "http://www.opengis.net/wmts/1.0");
            xml.attribute("xmlns:ows", "http://www.opengis.net/ows/1.1");
            xml.attribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
            xml.attribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
View Full Code Here

Examples of org.glassfish.jersey.client.ClientResponse.header()

            final ClientResponse responseContext = new ClientResponse(
                    Response.Status.OK, requestContext);

            final String headerValue = requestContext.getHeaderString(CsrfProtectionFilter.HEADER_NAME);
            if (headerValue != null) {
                responseContext.header(CsrfProtectionFilter.HEADER_NAME, headerValue);
            }
            return responseContext;
        }

        @Override
View Full Code Here

Examples of org.glassfish.jersey.server.ContainerRequest.header()

                URI.create("http://www.example.com/"),
                URI.create("http://www.example.com/?_method=PUT"),
                "POST",
                new MockSecurityContext(),
                new MockPropertiesDelegate());
        request.header(OverrideMethodFilter.HEADER, "DELETE");

        filter.filter(request);
        assertEqualsIgnoreCase(request.getMethod(), "DELETE");

    }
View Full Code Here

Examples of org.glassfish.jersey.server.RequestContextBuilder.header()

    private void testEncoding(String expected, String... accepted) throws IOException {
        EncodingFilter filter = initializeAndGetFilter();
        RequestContextBuilder builder = RequestContextBuilder.from("/resource", "GET");
        for (String a : accepted) {
            builder.header(HttpHeaders.ACCEPT_ENCODING, a);
        }
        ContainerRequest request = builder.build();
        ContainerResponse response = new ContainerResponse(request, Response.ok("OK!").build());
        filter.filter(request, response);
        if (response.getStatus() != 200) {
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.