OkHttpUtils
.get()
.url(FORUMS)
.addHeader("Authorization", credential)
.build()
.execute(new StringCallback()
{
@Override
public void onError(Call call, Exception e, int id) {
Log.i(TAG, "onError: "+e.toString());
}
@Override
public void onResponse(String response, int id) {
Log.i(TAG, "onResponse: "+response);
}
});
String credential = Credentials.basic("userName", "passWord");