Package io.higgs.http.client

Examples of io.higgs.http.client.POST.form()


                .form("with_estimate", withEstimate ? 1 : 0);
        if (max > 0) {
            request.form("max", max);
        }
        if (page > 0) {
            request.form("page", page);
        }
        applyConfig(request).execute();
        return future;
    }
View Full Code Here


                .form("hash", hash)
                .form("start", start)
                .form("end", end)
                .form("name", name);
        if (sample > 0) {
            request.form("sample", sample);
        }
        if (sources == null || sources.length == 0) {
            sources = new String[]{ "twitter" };
        }
        StringBuilder b = new StringBuilder();
View Full Code Here

        }
        StringBuilder b = new StringBuilder();
        for (String source : sources) {
            b.append(source).append(",");
        }
        request.form("sources", b.toString().substring(0, b.length() - 1));
        applyConfig(request).execute();
        return future;
    }
}
View Full Code Here

        URI uri = newParams().forURL(config.newAPIEndpointURI(id == null ? CREATE : UPDATE));
        POST request = config.http().POST(uri, new PageReader(newRequestCallback(future, new ManagedSource())))
                .form("source_type", source.type().value())
                .form("name", name);
        if (source.hasParams()) {
            request.form("parameters", source.getURLEncodedParameters());
        }
        if (source.hasResources()) {
            request.form("resources", source.getURLEncodedResources());
        }
        if (source.hasAuth()) {
View Full Code Here

                .form("name", name);
        if (source.hasParams()) {
            request.form("parameters", source.getURLEncodedParameters());
        }
        if (source.hasResources()) {
            request.form("resources", source.getURLEncodedResources());
        }
        if (source.hasAuth()) {
            request.form("auth", source.getURLEncodedAuth());
        }
        applyConfig(request).execute();
View Full Code Here

        }
        if (source.hasResources()) {
            request.form("resources", source.getURLEncodedResources());
        }
        if (source.hasAuth()) {
            request.form("auth", source.getURLEncodedAuth());
        }
        applyConfig(request).execute();
        return future;
    }
View Full Code Here

        FutureData<PushSubscription> future = new FutureData<PushSubscription>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(UPDATE));
        POST request = config.http().POST(uri, new PageReader(newRequestCallback(future, new PushSubscription())))
                .form("id", id);
        for (Map.Entry<String, String> e : connector.parameters().verifyAndGet().entrySet()) {
            request.form(e.getKey(), e.getValue());
        }
        if (name != null && !name.isEmpty()) {
            request.form("name", name);
        }
        applyConfig(request).execute();
View Full Code Here

                .form("id", id);
        for (Map.Entry<String, String> e : connector.parameters().verifyAndGet().entrySet()) {
            request.form(e.getKey(), e.getValue());
        }
        if (name != null && !name.isEmpty()) {
            request.form("name", name);
        }
        applyConfig(request).execute();
        return future;
    }
View Full Code Here

                pi.setResponse(new com.datasift.client.Response(s, response));
                future.received(pi);
            }
        })).form("id", id);
        if (cursor != null && !cursor.isEmpty()) {
            request.form("cursor", cursor);
        }
        if (size > 0) {
            request.form("size", size);
        }
        applyConfig(request).execute();
View Full Code Here

        })).form("id", id);
        if (cursor != null && !cursor.isEmpty()) {
            request.form("cursor", cursor);
        }
        if (size > 0) {
            request.form("size", size);
        }
        applyConfig(request).execute();
        return future;
    }
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.