Package io.higgs.http.client

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


        URI uri = newParams().forURL(config.newAPIEndpointURI(UPDATE));
        POST request = config.http()
                .POST(uri, new PageReader(newRequestCallback(future, new PushSubscription(), config)))
                .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

                .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

    }

    protected void sendPullRequest(PushSubscription id, int size, String cursor, URI uri, PullReader reader) {
        POST request = config.http().POST(uri, reader).form("id", id.getId());
        if (cursor != null && !cursor.isEmpty()) {
            request.form("cursor", cursor);
        }
        if (size > 0) {
            request.form("size", size);
        }
        applyConfig(request).execute();
View Full Code Here

        POST request = config.http().POST(uri, reader).form("id", id.getId());
        if (cursor != null && !cursor.isEmpty()) {
            request.form("cursor", cursor);
        }
        if (size > 0) {
            request.form("size", size);
        }
        applyConfig(request).execute();
    }

    public FutureData<PushLogMessages> log(String id, int page) {
View Full Code Here

        FutureData<PushLogMessages> future = new FutureData<>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(LOG));
        POST request = config.http()
                .POST(uri, new PageReader(newRequestCallback(future, new PushLogMessages(), config)));
        if (id != null && !id.isEmpty()) {
            request.form("id", id);
        }
        if (page > 0) {
            request.form("page", page);
        }
        if (perPage > 0) {
View Full Code Here

                .POST(uri, new PageReader(newRequestCallback(future, new PushLogMessages(), config)));
        if (id != null && !id.isEmpty()) {
            request.form("id", id);
        }
        if (page > 0) {
            request.form("page", page);
        }
        if (perPage > 0) {
            request.form("per_page", perPage);
        }
        if (orderBy != null && !orderBy.isEmpty()) {
View Full Code Here

        }
        if (page > 0) {
            request.form("page", page);
        }
        if (perPage > 0) {
            request.form("per_page", perPage);
        }
        if (orderBy != null && !orderBy.isEmpty()) {
            request.form("order_by", orderBy);
        }
        if (orderDirection != null && !orderDirection.isEmpty()) {
View Full Code Here

        }
        if (perPage > 0) {
            request.form("per_page", perPage);
        }
        if (orderBy != null && !orderBy.isEmpty()) {
            request.form("order_by", orderBy);
        }
        if (orderDirection != null && !orderDirection.isEmpty()) {
            request.form("order_dir", orderDirection);
        }
        applyConfig(request).execute();
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.