Package org.apache.stanbol.commons.testing.http

Examples of org.apache.stanbol.commons.testing.http.Request.withHeader()


    protected void pingSingleJob(String location) throws Exception{
        log.info("Start pinging {} ... ", location);
        boolean waiting = true;
        while(waiting){
            Request req = builder.buildOtherRequest(new HttpGet(location));
            req.withHeader("Accept", "application/json");
            log.info("Ping method: {}", req.getRequest().getMethod());
            log.info("Ping location: {}", req.getRequest().getURI());
            req.getRequest().setHeader("Accept","application/json");
            log.info("headers:");
            for(Header h : req.getRequest().getAllHeaders()){
View Full Code Here


     * @throws JSONException if the returned results are not valid JSON
     */
    protected RequestExecutor executeQuery(QueryTestCase test) throws IOException, JSONException {
        Request request = builder.buildPostRequest(endpointPath+test.getServicePath());
        for(Entry<String,String> header : test.getHeaders().entrySet()){
            request.withHeader(header.getKey(), header.getValue());
        }
        request.withContent(test.getContent());
        RequestExecutor re = executor.execute(request);
        assertQueryResults(re, test);
        return re;
View Full Code Here

     * @throws JSONException if the returned results are not valid JSON
     */
    protected RequestExecutor executeQuery(QueryTestCase test) throws IOException, JSONException {
        Request request = builder.buildPostRequest(endpointPath+test.getServicePath());
        for(Entry<String,String> header : test.getHeaders().entrySet()){
            request.withHeader(header.getKey(), header.getValue());
        }
        request.withContent(test.getContent());
        RequestExecutor re = executor.execute(request);
        assertQueryResults(re, test);
        return re;
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.