本文整理匯總了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);
}