com.google.sitebricks.client.Web Maven / Gradle / Ivy
package com.google.sitebricks.client;
import com.google.inject.ImplementedBy;
import java.util.Map;
/**
* @author Dhanji R. Prasanna ([email protected])
*/
@ImplementedBy(CommonsWeb.class)
public interface Web {
enum Auth {
BASIC, DIGEST
}
FormatBuilder clientOf(String url);
FormatBuilder clientOf(String url, Map headers);
static interface FormatBuilder {
ReadAsBuilder transports(Class clazz);
FormatBuilder auth(Auth auth, String username, String password);
}
static interface ReadAsBuilder {
WebClient over(Class extends Transport> clazz);
}
}