Package com.ning.http.client

Examples of com.ning.http.client.FluentStringsMap


        return "";
    }

    void reconnect() {
        Map<String, List<String>> c = request.queryString();
        FluentStringsMap f = new FluentStringsMap();
        f.putAll(c);
        try {
            options.runtime().executeRequest(requestBuilder.setQueryParams(f).build(), StreamTransport.this);
        } catch (IOException e) {
            logger.error("", e);
        }
View Full Code Here


            throw new IllegalStateException("No Encoder for " + data);
        }
    }

    protected AsyncHttpClient.BoundRequestBuilder configureAHC(Request request) {
        FluentStringsMap m = DefaultSocket.decodeQueryString(request);

        return options.runtime().preparePost(request.uri())
                .setHeaders(request.headers())
                .setQueryParams(m)
                .setMethod(Request.METHOD.POST.name());
View Full Code Here

        super(transport, options, rootFuture, functions);
    }

    @Override
    protected AsyncHttpClient.BoundRequestBuilder configureAHC(Request request) {
        FluentStringsMap m = DefaultSocket.decodeQueryString(request);
        m.put("X-Atmosphere-Transport", Arrays.asList(new String[]{"polling"}));
        m.remove("X-atmo-protocol");

        return options.runtime().preparePost(request.uri())
                .setHeaders(request.headers())
                .setQueryParams(m)
                .setMethod(Request.METHOD.POST.name());
View Full Code Here

        ((DefaultOptions) options).b.reconnect(false);

        if (!closedByProtocol.getAndSet(true)) {
            RequestBuilder r = new RequestBuilder();
            FluentStringsMap f = new FluentStringsMap();
            f.add("X-Atmosphere-Transport", "close").add("X-Atmosphere-tracking-id", decodeQueryString(request).get("X-Atmosphere-tracking-id"));

            r.setUrl(request.uri())
                    .setMethod("GET")
                    .setHeaders(request.headers())
                    .setQueryParams(f);
View Full Code Here

        return connect(r, transports, timeout, tu);
    }

    static FluentStringsMap decodeQueryString(Request request) {
        Map<String, List<String>> c = request.queryString();
        FluentStringsMap f = new FluentStringsMap();
        f.putAll(c);
        return f;
    }
View Full Code Here

    public MultipartRequestEntity(Part[] parts, FluentStringsMap methodParams) {
        if (parts == null) {
            throw new IllegalArgumentException("parts cannot be null");
        }
        if (methodParams == null) {
            methodParams = new FluentStringsMap();
        }
        this.parts = parts;
        this.methodParams = methodParams;
    }
View Full Code Here

TOP

Related Classes of com.ning.http.client.FluentStringsMap

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.