Search in sources :

Example 1 with GetBuilder

use of com.eros.framework.http.okhttp.builder.GetBuilder in project WeexErosFramework by bmfe.

the class AxiosManager method get.

public void get(String mUrl, HashMap<String, String> params, HashMap<String, String> header, Callback callback, Object tag, long timeout) {
    mUrl = safeUrl(mUrl);
    if (mUrl == null) {
        if (callback != null) {
            callback.onError(null, new IrregularUrlException("url不合法"), 0);
        }
        return;
    }
    if (header == null) {
        header = new HashMap<>();
    }
    setTimeout(timeout);
    GetBuilder builder = OkHttpUtils.get().url(mUrl).tag(tag).headers(header);
    generateParams(params, builder);
    builder.build().execute(callback);
}
Also used : GetBuilder(com.eros.framework.http.okhttp.builder.GetBuilder) IrregularUrlException(com.eros.framework.http.okhttp.exception.IrregularUrlException)

Aggregations

GetBuilder (com.eros.framework.http.okhttp.builder.GetBuilder)1 IrregularUrlException (com.eros.framework.http.okhttp.exception.IrregularUrlException)1