本文整理了Java中retrofit2.http.Multipart
类的一些代码示例,展示了Multipart
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Multipart
类的具体详情如下:
包路径:retrofit2.http.Multipart
类名称:Multipart
暂无
代码示例来源:origin: easemob/kefu-android-demo
/**
* 单文件上传
* @param file
* @return
*/
@Multipart
@POST("chatfiles")
Call<ResponseBody> upload(@Part MultipartBody.Part file);
代码示例来源:origin: LRH1993/LiveCircle
@Multipart
@POST("{url}")
Observable<ResponseBody> upLoadFile(
@Path("url") String url,
@Part("image\"; filename=\"image.jpg") RequestBody requestBody);
代码示例来源:origin: 736008081/frameAndroid
/**
* 上次图片
*/
@Multipart
@POST("ja/v1/boss/file/upload")
// @Headers("Content-Type: multipart/form-data; boundary=---------------7d4a6d158c9")
Observable<BaseResult<String>> uploadImage(@PartMap Map<String, RequestBody> params);
代码示例来源:origin: zhpanvip/Retrofit2
/**
* 单文件上传 方法一
* @param partList
* @return
*/
@Multipart
@POST("upload/uploadFile.do")
Observable<BasicResponse> uploadFiles(@Part List<MultipartBody.Part> partList);
代码示例来源:origin: LRH1993/RetrofitRxJavaBox
@Multipart
@POST("{url}")
Observable<ResponseBody> upLoadFile(
@Path("url") String url,
@Part("image\"; filename=\"image.jpg") RequestBody requestBody);
代码示例来源:origin: ikidou/Retrofit2Demo
@POST("/form")
@Multipart
Call<ResponseBody> testFileUpload3(@PartMap Map<String, RequestBody> args);
}
代码示例来源:origin: gotify/android
/**
*
* Upload an image for an application
* @param file the application image (required)
* @param id the application id (required)
* @return Call<Application>
*/
@retrofit2.http.Multipart
@POST("application/{id}/image")
Call<Application> uploadAppImage(
@retrofit2.http.Part("file\"; filename=\"file") RequestBody file, @retrofit2.http.Path("id") Integer id
);
代码示例来源:origin: q422013/Android-FastCode
@Multipart
@POST("csh-interface/endUser/editUserPhoto.jhtml")
Observable<BaseResponse<ModifyUserPhotoResponse>> modifyUserPhoto(@PartMap Map<String, RequestBody> params);
}
代码示例来源:origin: Mp5A5/HttpRequest
@Multipart
@POST("ues/app/upload/pictures")
Observable<UploadEntity> postUpload(@Part List<MultipartBody.Part> partList);
}
代码示例来源:origin: TUM-Dev/Campus-Android
@Multipart
@POST(API_FEEDBACK + "{id}/{image}/")
Call<Success> sendFeedbackImage(@Part MultipartBody.Part image, @Path("image") int imageNr, @Path("id") String feedbackId);
代码示例来源:origin: luhaoaimama1/zone-sdk
@Multipart
@POST ("log")
Call<Data> sendFiles (@PartMap Map<String, RequestBody> params);
}
代码示例来源:origin: luhaoaimama1/zone-sdk
@Multipart
@POST("log")
Call<Data> sendFile(@Part(value = "myFile",encoding = "utf-8") RequestBody file);//upload
代码示例来源:origin: rundeck/rundeck-cli
@Multipart
@Headers("Accept: application/json")
@POST("project/{project}/run/script")
Call<AdhocResponse> runScript(
@Path("project") String project,
@Part MultipartBody.Part scriptFile,
@Query("argString") String argString,
@Query("scriptInterpreter") String scriptInterpreter,
@Query("interpreterArgsQuoted") boolean interpreterArgsQuoted,
@Query("fileExtension") String fileExtension,
@Query("filter") String filter
);
代码示例来源:origin: amahi/android
@Multipart
@POST("/files")
Call<ResponseBody> uploadFile(
@Header("Session") String session,
@Query("s") String share,
@Query("p") String path,
@Part MultipartBody.Part file);
代码示例来源:origin: ikidou/Retrofit2Demo
/**
* PartMap 注解支持一个Map作为参数,支持 {@link RequestBody } 类型,
* 如果有其它的类型,会被{@link retrofit2.Converter}转换,如后面会介绍的 使用{@link com.google.gson.Gson} 的 {@link retrofit2.converter.gson.GsonRequestBodyConverter}
* 所以{@link MultipartBody.Part} 就不适用了,所以文件只能用<b> @Part MultipartBody.Part </b>
*/
@POST("/form")
@Multipart
Call<ResponseBody> testFileUpload2(@PartMap Map<String, RequestBody> args, @Part MultipartBody.Part file);
代码示例来源:origin: jenkinsci/jira-steps-plugin
@Multipart
@Headers("X-Atlassian-Token: no-check")
@POST("rest/api/2/issue/{issueIdOrKey}/attachments")
Call<Object> uploadAttachment(@Path("issueIdOrKey") String issueIdOrKey,
@Part MultipartBody.Part file);
代码示例来源:origin: org.nuxeo.client/nuxeo-java-client
/**
* @since 2.2
*/
@Multipart
@POST("automation/{operationId}")
Call<Object> execute(@Path("operationId") String operationId, @Part("request") OperationBody body, @Part List<MultipartBody.Part> filePart);
代码示例来源:origin: FussenYu/MVP_Project
@Multipart
@POST()
Observable<ResponseBody> uploadFiles(
@Url() String url,
@PartMap() Map<String, RequestBody> maps);
代码示例来源:origin: lygttpod/RxHttpUtils
/**
* 上传多个文件
*
* @param uploadUrl 地址
* @param files 文件
* @return ResponseBody
*/
@Multipart
@POST
Observable<ResponseBody> uploadFiles(@Url String uploadUrl,
@Part List<MultipartBody.Part> files);
}
代码示例来源:origin: flyleft/xmarket
/**
* 发布商品
*/
@Multipart
@POST(ApiConf.create_trade)
Observable<Result<String>> addTrade(
@Part("trade") RequestBody trade,
@Part List<MultipartBody.Part> parts);
内容来源于网络,如有侵权,请联系作者删除!