Package org.apache.abdera.protocol

Examples of org.apache.abdera.protocol.Response


        Service service = service_doc.getRoot();
        Collection collection = service.getWorkspaces().get(0).getCollections().get(0);
        String uri = collection.getHref().toString();

        // Post the entry to the collection
        Response response = abderaClient.post(uri, entry);

        // Check the result
        if (response.getStatus() == 201)
            System.out.println("Success!");
        else
            System.out.println("Failed!");
    }
View Full Code Here


        // current Roller APP implementation still currently requires it.
        RequestOptions options = abderaClient.getDefaultRequestOptions();
        options.setHeader("Title", "mypodcast.mp3");

        // Post the entry
        Response response = abderaClient.post(uri, re, options);

        // Check the response
        if (response.getStatus() == 201)
            System.out.println("Success!");
        else
            System.out.println("Failed!");
    }
View Full Code Here

        RequestOptions options = abderaClient.getDefaultRequestOptions();
        options.setUseChunked(false);

        // Post the entry
        Response response = abderaClient.post(uri, entry, options);

        // Google Calendar might return a 302 response with a new POST URI.
        // If it does, get the new URI and post again
        if (response.getStatus() == 302) {
            uri = response.getLocation().toString();
            response = abderaClient.post(uri, entry, options);
        }

        // Check the response
        if (response.getStatus() == 201)
            System.out.println("Success!");
        else
            System.out.println("Failed!");

    }
View Full Code Here

TOP

Related Classes of org.apache.abdera.protocol.Response

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.