<dependency> <groupId>com.github.tophe</groupId> <artifactId>ion</artifactId> <version>1.0.0</version> </dependency> Ion.with(context) .load("https://api.example.com/data") .asString() .setCallback(new FutureCallback<String>() { @Override public void onCompleted(Exception e, String result) { if (e != null) { } else { } } }); Ion.with(context) .load("https://api.example.com/data") .asInputStream() .setCallback(new FutureCallback<InputStream>() { @Override public void onCompleted(Exception e, InputStream result) { if (e != null) { } else { } } });


上一篇:
下一篇:
切换中文