Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ protected void onCreate(Bundle savedInstanceState) {

@OnClick(R.id.btn_download)
public void download() {
String url = "http://219.128.78.33/apk.r1.market.hiapk.com/data/upload/2015/05_20/14/com.speedsoftware.rootexplorer_140220.apk";
HttpRequest.download(url, new File("/sdcard/rootexplorer_140220.apk"), new FileDownloadCallback() {
String url = "http://www.bus365.com/public/phoneClient/BUS365.apk";
HttpRequest.download(url, new File("/sdcard/BUS365.apk"), new FileDownloadCallback() {
@Override public void onStart() {
super.onStart();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected void onCreate(Bundle savedInstanceState) {
params.addFormDataPart("limit", 12);
HttpRequest.post(Api.NEW_GAME, params, new JsonHttpRequestCallback() {
@Override
protected void onSuccess(JSONObject jsonObject) {
public void onSuccess(JSONObject jsonObject) {
super.onSuccess(jsonObject);
mTvResult.setText(JsonFormatUtils.formatJson(jsonObject.toJSONString()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected void onCreate(Bundle savedInstanceState) {
params.addFormDataPart("limit", 12);
HttpRequest.post(Api.NEW_GAME, params, new StringHttpRequestCallback() {
@Override
protected void onSuccess(String s) {
public void onSuccess(String s) {
super.onSuccess(s);
mTvResult.setText(JsonFormatUtils.formatJson(s));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ private void initOkHttpFinal() {
.setDebug(true);
// addHttps(builder);
OkHttpFinal.getInstance().init(builder.build());
OkHttpFinal.getInstance().updateCommonHeader("Accept-Encoding", "identity");
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
public class MyBaseHttpRequestCallback<T extends BaseApiResponse> extends BaseHttpRequestCallback<T>{

@Override
protected void onSuccess(T t) {
public void onSuccess(T t) {
int code = t.getCode();
if ( code == 1 ) {
onLogicSuccess(t);
Expand Down