Skip to content

Commit

Permalink
修改使用说明
Browse files Browse the repository at this point in the history
  • Loading branch information
wyba committed Sep 3, 2019
1 parent 21b9e99 commit d484716
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,20 @@
dependencies {
implementation 'com.github.wyba:RxHttp:V1.0.0'
implementation 'com.github.wyba:RxHttp:V1.0.1'
}

Application:

RxHttp.getInstance().init("http://192.168.2.112:8081/", 20 * 1000);
RxHttp.init("http://192.168.2.112:8081/", 20 * 1000);

Use:

RxHttp.getInstance().get("book/framebookquery", bookRequest).execute(new CommonCallBack<BookResponse>() {
@Override
public void onFinal(BookResponse bookResponse) {
if (bookResponse != null) {
for (BookInfo bookInfo : bookResponse.getData_list()) {
Log.e("queryShelfBook", "\n" + bookInfo.toString());
}
}
}
});
RxHttp.post(url, content, new CommonCallBack<String>() {
@Override
public void onFinal(String s) {
}
});

0 comments on commit d484716

Please sign in to comment.