public static DocumentListEntry executePost( HttpRequestFactory requestFactory, DocsUrl url, AtomContent content) throws IOException { HttpRequest request = requestFactory.buildPostRequest(url, content); HttpResponse response = requestExecutor.executeSensitive(request); return response.parseAs(DocumentListEntry.class); }
public static Entry executeGet( HttpRequestFactory requestFactory, DocsUrl url, Class<Entry> feedClass) throws IOException { HttpRequest request = requestFactory.buildGetRequest(url); HttpResponse response = requestExecutor.executeNonSensitive(request); return response.parseAs(feedClass); }
public static InputStream executeGetContent(HttpRequestFactory requestFactory, DocsUrl url) throws IOException { HttpRequest request = requestFactory.buildGetRequest(url); HttpResponse response = requestExecutor.executeNonSensitive(request); return response.getContent(); }
public static void executeDelete( HttpRequestFactory requestFactory, DocsUrl url, String etag, boolean matchAll) throws IOException { HttpRequest request = requestFactory.buildDeleteRequest(url); if (matchAll) request.getHeaders().setIfMatch("*"); else request.getHeaders().setIfMatch(etag); HttpResponse response = requestExecutor.executeNonSensitive(request); response.ignore(); }
public static Feed first100Entries(HttpRequestFactory requestFactory, DocsUrl url) throws IOException { HttpRequest request = requestFactory.buildGetRequest(url); HttpResponse response = requestExecutor.executeNonSensitive(request); return response.parseAs(Feed.class); }