Package io.higgs.http.client.readers

Examples of io.higgs.http.client.readers.PageReader


            throw new IllegalArgumentException("Type and name are both required");
        }
        final FutureData<DynamicList> future = new FutureData<>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(CREATE));
        Request request = config.http()
                .POST(uri, new PageReader(newRequestCallback(future, new DynamicList(), config)))
                .form("type", type.toString())
                .form("name", name);
        performRequest(future, request);
        return future;
    }
View Full Code Here


            throw new IllegalArgumentException("Id is required");
        }
        final FutureData<DataSiftResult> future = new FutureData<>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(DELETE));
        Request request = config.http()
                .POST(uri, new PageReader(newRequestCallback(future, new BaseDataSiftResult(), config)))
                .form("id", list.getId());
        performRequest(future, request);
        return future;
    }
View Full Code Here

        final FutureData<DataSiftResult> future = new FutureData<>();
        final ObjectMapper mapper = new ObjectMapper();
        URI uri = newParams().forURL(config.newAPIEndpointURI(EXISTS));
        try {
            Request request = config.http()
                    .POST(uri, new PageReader(newRequestCallback(future, new BaseDataSiftResult(), config)))
                    .form("id", list.getId())
                    .form("items", mapper.writeValueAsString(items));
            performRequest(future, request);
        } catch (JsonProcessingException e) {
            failNotify(future, e);
View Full Code Here

        final FutureData<DataSiftResult> future = new FutureData<>();
        final ObjectMapper mapper = new ObjectMapper();
        URI uri = newParams().forURL(config.newAPIEndpointURI(ADD));
        try {
            Request request = config.http()
                    .POST(uri, new PageReader(newRequestCallback(future, new BaseDataSiftResult(), config)))
                    .form("id", list.getId())
                    .form("items", mapper.writeValueAsString(items));
            performRequest(future, request);
        } catch (JsonProcessingException e) {
            failNotify(future, e);
View Full Code Here

        final FutureData<DataSiftResult> future = new FutureData<>();
        final ObjectMapper mapper = new ObjectMapper();
        URI uri = newParams().forURL(config.newAPIEndpointURI(REMOVE));
        try {
            Request request = config.http()
                    .POST(uri, new PageReader(newRequestCallback(future, new BaseDataSiftResult(), config)))
                    .form("id", list.getId())
                    .form("items", mapper.writeValueAsString(items));
            performRequest(future, request);
        } catch (JsonProcessingException e) {
            failNotify(future, e);
View Full Code Here

            throw new IllegalArgumentException("A valid list is required");
        }
        final FutureData<ReplaceList> future = new FutureData<>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(START));
        Request request = config.http()
                .POST(uri, new PageReader(newRequestCallback(future, new ReplaceList(), config)))
                .form("list_id", list.getId());
        performRequest(future, request);
        return future;
    }
View Full Code Here

        final FutureData<DataSiftResult> future = new FutureData<>();
        final ObjectMapper mapper = new ObjectMapper();
        URI uri = newParams().forURL(config.newAPIEndpointURI(ADD));
        try {
            Request request = config.http()
                    .POST(uri, new PageReader(newRequestCallback(future, new BaseDataSiftResult(), config)))
                    .form("id", list.getId())
                    .form("items", mapper.writeValueAsString(items));
            performRequest(future, request);
        } catch (JsonProcessingException e) {
            failNotify(future, e);
View Full Code Here

            throw new IllegalArgumentException("Id is required");
        }
        final FutureData<DataSiftResult> future = new FutureData<>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(COMMIT));
        Request request = config.http()
                .POST(uri, new PageReader(newRequestCallback(future, new BaseDataSiftResult(), config)))
                .form("id", list.getId());
        performRequest(future, request);
        return future;
    }
View Full Code Here

            throw new IllegalArgumentException("Id is required");
        }
        final FutureData<DataSiftResult> future = new FutureData<>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(ABORT));
        Request request = config.http()
                .POST(uri, new PageReader(newRequestCallback(future, new BaseDataSiftResult(), config)))
                .form("id", list.getId());
        performRequest(future, request);
        return future;
    }
View Full Code Here

            throw new IllegalStateException("Invalid dumy URL????");
        }
    }

    public WrappedResponse() {
        super("", new io.higgs.http.client.Response(HttpRequestBuilder.instance().GET(DUMMY_URL, new PageReader()),
                new PageReader()));
    }
View Full Code Here

TOP

Related Classes of io.higgs.http.client.readers.PageReader

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.