本文整理汇总了Java中com.koushikdutta.ion.future.ResponseFuture类的典型用法代码示例。如果您正苦于以下问题:Java ResponseFuture类的具体用法?Java ResponseFuture怎么用?Java ResponseFuture使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ResponseFuture类属于com.koushikdutta.ion.future包,在下文中一共展示了ResponseFuture类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: postUser
import com.koushikdutta.ion.future.ResponseFuture; //导入依赖的package包/类
public static ResponseFuture<String> postUser(Context context,String userId) {
return Ion.with(context).load(POST,BuildConfig.API_URL+"users/"+userId)
.asString();
}
示例2: postFavoriteTalk
import com.koushikdutta.ion.future.ResponseFuture; //导入依赖的package包/类
public static ResponseFuture<String> postFavoriteTalk(Context context,String userId,long talkId) {
Log.d(TAG,"Favorite talk "+talkId);
return Ion.with(context).load(POST, BuildConfig.API_URL+"users/"+userId+"/talks/"+talkId)
.asString();
}
示例3: deleteFavoriteTalk
import com.koushikdutta.ion.future.ResponseFuture; //导入依赖的package包/类
public static ResponseFuture<String> deleteFavoriteTalk(Context context,String userId,long talkId) {
Log.d(TAG,"Unfavorite talk "+talkId);
return Ion.with(context).load(DELETE,BuildConfig.API_URL+"users/"+userId+"/talks/"+talkId)
.asString();
}
示例4: getLastUpdated
import com.koushikdutta.ion.future.ResponseFuture; //导入依赖的package包/类
public static ResponseFuture<String> getLastUpdated(Context context,String userId) {
Log.d(TAG,"Get last update");
return Ion.with(context).load(GET, BuildConfig.API_URL + "users/" + userId + "/lastupdated")
.asString();
}
示例5: download
import com.koushikdutta.ion.future.ResponseFuture; //导入依赖的package包/类
public ResponseFuture<File> download(ImageInfo imageInfo, File file) {
return Ion.with(context)
.load(getDownloadUrl(imageInfo))
.write(file);
}