com.google.sitebricks.client.WebClient Maven / Gradle / Ivy
package com.google.sitebricks.client;
import com.google.common.util.concurrent.ListenableFuture;
import java.util.concurrent.Executor;
/**
* Synchronous and async http client.
*
* @author Dhanji R. Prasanna ([email protected])
*/
public interface WebClient {
WebResponse get();
WebResponse post(T t);
WebResponse put(T t);
WebResponse patch(T t);
WebResponse delete();
ListenableFuture get(Executor executor);
ListenableFuture post(T t, Executor executor);
ListenableFuture put(T t, Executor executor);
ListenableFuture patch(T t, Executor executor);
ListenableFuture delete(Executor executor);
/**
* Close the underlying client.
*/
void close();
}