retrofit2.http.Part Java Examples

The following examples show how to use retrofit2.http.Part. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: octoandroid   Author: nairbspace   File: ApiManagerImpl.java    License: GNU General Public License v3.0 5 votes vote down vote up
@Override
public Func1<MultipartBody.Part, Observable<?>> funcUploadFile() {
    return new Func1<MultipartBody.Part, Observable<?>>() {
        @Override
        public Observable call(MultipartBody.Part part) {
            String location = mDbHelper.getActivePrinterDbEntity().getUploadLocation();
            return uploadFile(location, part);
        }
    };
}
 
Example #2
Source Project: maoni   Author: rm3l   File: DoorbellService.java    License: MIT License 5 votes vote down vote up
@Multipart
@POST("applications/{id}/upload")
Call<String[]> uploadScreenshot(
        @HeaderMap final Map<String, String> httpHeaders,
        @Path("id") final int applicationId,
        @Query("key") final String key,
        @Part("files[]\"; filename=\"screenshot.png\" ") final RequestBody filename);
 
Example #3
Source Project: maoni   Author: rm3l   File: DoorbellService.java    License: MIT License 5 votes vote down vote up
@Multipart
@POST("applications/{id}/upload")
Call<String[]> uploadLogs(
        @HeaderMap final Map<String, String> httpHeaders,
        @Path("id") final int applicationId,
        @Query("key") final String key,
        @Part("files[]\"; filename=\"logs.txt\" ") final RequestBody filename);
 
Example #4
Source Project: MoeGallery   Author: kurumi-moe   File: AnimePictures.java    License: GNU General Public License v3.0 5 votes vote down vote up
@Multipart
@POST("/login/submit")
Call<AnimePicturesUser> login(
        @Part("login") RequestBody username,
        @Part("password") RequestBody password,
        @Part("time_zone") RequestBody timezone
);
 
Example #5
Source Project: appcenter-plugin   Author: jenkinsci   File: UploadService.java    License: MIT License 4 votes vote down vote up
@Multipart
@POST
CompletableFuture<Void> uploadApp(@Url @Nonnull String url, @Part @Nonnull MultipartBody.Part file);
 
Example #6
Source Project: Pixiv-Shaft   Author: CeuiLiSA   File: IqdbApi.java    License: MIT License 4 votes vote down vote up
@Multipart
@POST("/")
Observable<Response<ResponseBody>> query(@Part MultipartBody.Part part);
 
Example #7
Source Project: Pixiv-Shaft   Author: CeuiLiSA   File: SauceNaoApi.java    License: MIT License 4 votes vote down vote up
@Multipart
@POST("/search.php")
Observable<Response<ResponseBody>> query(@Part MultipartBody.Part part);
 
Example #8
Source Project: Pixiv-Shaft   Author: CeuiLiSA   File: AppApi.java    License: MIT License 4 votes vote down vote up
@Multipart
@POST("v1/user/profile/edit")
Observable<NullResponse> updateUserProfile(@Header("Authorization") String token,
                                           @Part List<MultipartBody.Part> parts);
 
Example #9
Source Project: Pixiv-Shaft   Author: CeuiLiSA   File: TinEyeApi.java    License: MIT License 4 votes vote down vote up
@Multipart
@POST("/search")
Observable<Response<ResponseBody>> query(@Part MultipartBody.Part part);
 
Example #10
Source Project: FastWaiMai   Author: zion223   File: RestService.java    License: MIT License 4 votes vote down vote up
@Multipart
@POST
Call<String> upload(@Url String url, @Part MultipartBody.Part files);
 
Example #11
Source Project: FastWaiMai   Author: zion223   File: RxRestService.java    License: MIT License 4 votes vote down vote up
@Multipart
@POST
Observable<String> upload(@Url String url, @Part MultipartBody.Part files);
 
Example #12
Source Project: Infinity-For-Reddit   Author: Docile-Alligator   File: RedditAPI.java    License: GNU Affero General Public License v3.0 4 votes vote down vote up
@Multipart
@POST(".")
Call<String> uploadMediaToAWS(@PartMap() Map<String, RequestBody> params, @Part() MultipartBody.Part file);
 
Example #13
Source Project: 1Rramp-Android   Author: hapramp   File: HaprampAPI.java    License: MIT License 4 votes vote down vote up
@Multipart
@POST("upload")
Call<FileUploadReponse> uploadFile(@Part MultipartBody.Part file);
 
Example #14
Source Project: AndroidFrame   Author: DaleSmith   File: Apis.java    License: Apache License 2.0 4 votes vote down vote up
@POST("add/upload-pictures")
    @Multipart
//表示这个接口有文件上传
    Call<ResponseBody> uploadFiles(@Part MultipartBody.Part idcardImg, @Part MultipartBody.Part bankcardImg);
 
Example #15
Source Project: MvpRoute   Author: TLocation   File: LoginService.java    License: Apache License 2.0 4 votes vote down vote up
@Multipart
	@POST("/?s=App.CDN.UploadImg")
//	@Progress()
	Observable<UploadResponse> uploadImage(@Part List<MultipartBody.Part> partList);
 
Example #16
Source Project: Collection-Android   Author: usernameyangyan   File: RequestService.java    License: MIT License 4 votes vote down vote up
@Multipart
@POST
Observable<ResponseBody> uploadFile(@Url String url, @QueryMap Map<String, Object> map,
                                                @Part MultipartBody.Part image);
 
Example #17
Source Project: Collection-Android   Author: usernameyangyan   File: RequestService.java    License: MIT License 4 votes vote down vote up
@Multipart
@POST
Observable<ResponseBody> uploadFileWithHeaders(@Url String url, @QueryMap Map<String, Object> map,
                                                           @Part MultipartBody.Part image, @HeaderMap Map<String, String> headers);
 
Example #18
Source Project: Collection-Android   Author: usernameyangyan   File: RequestService.java    License: MIT License 4 votes vote down vote up
@Multipart
@POST
Observable<ResponseBody> uploadFile(@Url String url, @QueryMap Map<String, Object> map,
                                                 @Part() MultipartBody.Part[] images);
 
Example #19
Source Project: Collection-Android   Author: usernameyangyan   File: RequestService.java    License: MIT License 4 votes vote down vote up
@Multipart
@POST
Observable<ResponseBody> uploadFileWithHeaders(@Url String url, @QueryMap Map<String, Object> map,
                                                            @Part() MultipartBody.Part[] images, @HeaderMap Map<String, String> headers);
 
Example #20
Source Project: Android-MVP   Author: Alex-Jerry   File: JerryApiService.java    License: Apache License 2.0 4 votes vote down vote up
@Multipart
@POST("api/user/modifyDevice")
Observable<BaseResponse> uploadImage(@PartMap Map<String, RequestBody> map, @Part MultipartBody.Part file);
 
Example #21
Source Project: NewFastFrame   Author: HelloChenJinJun   File: UpLoadApi.java    License: Apache License 2.0 4 votes vote down vote up
@POST
public Observable<Response> upLoad(@Url String url, @Part MultipartBody.Part part);
 
Example #22
Source Project: Bus-Tracking-Parent   Author: Rjtsahu   File: ApiInterface.java    License: GNU General Public License v3.0 4 votes vote down vote up
@Multipart
@POST("upload")
Call<Response> uploadImage(@Query(QRY_TOKEN) String token,@Query(QRY_KID_ID) String kid_id, @Part MultipartBody.Part image);
 
Example #23
Source Project: JD-Test   Author: liu-xiao-dong   File: BaseApiService.java    License: Apache License 2.0 4 votes vote down vote up
@Multipart
@POST()
Flowable<ResponseBody> upLoadImage(
        @Url() String url,
        @Part("image\"; filename=\"image.jpg") RequestBody requestBody);
 
Example #24
Source Project: JD-Test   Author: liu-xiao-dong   File: BaseApiService.java    License: Apache License 2.0 4 votes vote down vote up
@Multipart
@POST()
Flowable<ResponseBody> uploadFlie(
        @Url String fileUrl,
        @Part("description") RequestBody description,
        @Part("files") MultipartBody.Part file);
 
Example #25
Source Project: JD-Test   Author: liu-xiao-dong   File: BaseApiService.java    License: Apache License 2.0 4 votes vote down vote up
@Multipart
@POST
Flowable<ResponseBody> uploadFileWithPartMap(
        @Url() String url,
        @PartMap() Map<String, RequestBody> partMap,
        @Part("file") MultipartBody.Part file);
 
Example #26
Source Project: RxEasyHttp   Author: zhou-you   File: ApiService.java    License: Apache License 2.0 4 votes vote down vote up
@Multipart
@POST()
Observable<ResponseBody> uploadFlie(@Url String fileUrl, @Part("description") RequestBody description, @Part("files") MultipartBody.Part file);
 
Example #27
Source Project: RxEasyHttp   Author: zhou-you   File: ApiService.java    License: Apache License 2.0 4 votes vote down vote up
@Multipart
@POST()
Observable<ResponseBody> uploadFiles(@Url String url, @Part() List<MultipartBody.Part> parts);
 
Example #28
Source Project: imageres_resolution   Author: zhangyangjing   File: APIService.java    License: MIT License 4 votes vote down vote up
@POST("api")
@Multipart
Call<Bitmap> processPng(@Part("style") RequestBody type,
                        @Part("scale") RequestBody scale,
                        @Part("noise") RequestBody noise,
                        @Part("file\"; filename=\"test.png") RequestBody img);
 
Example #29
Source Project: android-retrofit-image-upload   Author: Learn2Crack   File: RetrofitInterface.java    License: MIT License 4 votes vote down vote up
@Multipart
@POST("/images/upload")
Call<Response> uploadImage(@Part MultipartBody.Part image);
 
Example #30
Source Project: RetrofitClient   Author: Jadyli   File: CommonRequest.java    License: MIT License 4 votes vote down vote up
@Multipart
@POST("{path}")
Observable<ResponseBody> uploadFile(@Path(value = "path", encoded = true) String url,
                                    @Part("description") RequestBody description, @Part MultipartBody.Part file);