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 File: DoorbellService.java    From maoni with 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 #2
Source File: AnimePictures.java    From MoeGallery with 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 #3
Source File: DoorbellService.java    From maoni with 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 File: ApiManagerImpl.java    From octoandroid with 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 #5
Source File: HttpUploadService.java    From RxjavaRetrofitDemo-string-master with MIT License 4 votes vote down vote up
@Multipart
@POST("AppYuFaKu/uploadHeadImg")
Observable<String> uploadImage(@Part("uid") RequestBody uid, @Part("auth_key") RequestBody auth_key,
                               @Part MultipartBody.Part file);
 
Example #6
Source File: GitHubService.java    From ZZShow with Apache License 2.0 4 votes vote down vote up
@Multipart
@PUT("user/photo")
Call<User> updateUser(@Part("photo")RequestBody photo,@Part("description") RequestBody description);
 
Example #7
Source File: MyRetrofitTest.java    From zone-sdk with MIT License 4 votes vote down vote up
@Multipart
@POST("log")
Call<Data> sendFile(@Part(value = "myFile",encoding = "utf-8") RequestBody file);
 
Example #8
Source File: ForumService.java    From TLint with Apache License 2.0 4 votes vote down vote up
@POST("img/Imgup")
@Multipart
Observable<UploadData> upload(@Part MultipartBody.Part file,
                              @PartMap Map<String, RequestBody> params);
 
Example #9
Source File: FileResourceService.java    From dhis2-android-sdk with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Multipart
@POST(FILE_RESOURCES)
Call<ResponseBody> uploadFile(@Part MultipartBody.Part filePart);
 
Example #10
Source File: AnimePictures.java    From MoeGallery with GNU General Public License v3.0 4 votes vote down vote up
@Multipart
@POST("/pictures/autocomplete_tag")
Call<AnimePicturesTagList> tag(
        @Part("tag") RequestBody tags
);
 
Example #11
Source File: MockGhostApiService.java    From quill with MIT License 4 votes vote down vote up
@Override
public Call<JsonElement> uploadFile(@Header("Authorization") String authHeader, @Part MultipartBody.Part file) {
    return null;
}
 
Example #12
Source File: GhostApiService.java    From quill with MIT License 4 votes vote down vote up
@Multipart
@POST("uploads/")
Call<JsonElement> uploadFile(@Header("Authorization") String authHeader,
                             @Part MultipartBody.Part file);
 
Example #13
Source File: Example9.java    From AnDevCon-RxPatterns with Apache License 2.0 4 votes vote down vote up
@Multipart
@POST("/upload/drive/v2/files?uploadType=media")
Observable<UploadResponse> mediaUpload(
        @Part("file") RequestBody mediaFile,
        @Header("Content-Type") String headerContentType
);
 
Example #14
Source File: ZulipServices.java    From zulip-android with Apache License 2.0 4 votes vote down vote up
@Streaming
@Multipart
@POST("v1/user_uploads")
Call<UploadResponse> upload(@Part MultipartBody.Part file);
 
Example #15
Source File: IqdbApi.java    From Pixiv-Shaft with MIT License 4 votes vote down vote up
@Multipart
@POST("/")
Observable<Response<ResponseBody>> query(@Part MultipartBody.Part part);
 
Example #16
Source File: ApiService.java    From journaldev with MIT License 4 votes vote down vote up
@Multipart
@POST("/upload")
Call<ResponseBody> postImage(@Part MultipartBody.Part image, @Part("upload") RequestBody name);
 
Example #17
Source File: HttpUploadService.java    From RxjavaRetrofitDemo-master with MIT License 4 votes vote down vote up
@Multipart
@POST("AppYuFaKu/uploadHeadImg")
Observable<BaseResultEntity<UploadResulte>> uploadImage(@Part("uid") RequestBody uid, @Part("auth_key") RequestBody  auth_key,
                                                        @Part MultipartBody.Part file);
 
Example #18
Source File: Service.java    From aptoide-client-v8 with GNU General Public License v3.0 4 votes vote down vote up
@POST("createUser") @Multipart Observable<BaseV3Response> createUserWithFile(
@Part MultipartBody.Part user_avatar, @PartMap() HashMapNotNull<String, RequestBody> args,
@Header(WebService.BYPASS_HEADER_KEY) boolean bypassCache);
 
Example #19
Source File: V7.java    From aptoide-client-v8 with GNU General Public License v3.0 4 votes vote down vote up
@Multipart @POST("user/set") Observable<BaseV7Response> editUser(
@Part MultipartBody.Part user_avatar,
@PartMap HashMapNotNull<String, okhttp3.RequestBody> body);
 
Example #20
Source File: V7.java    From aptoide-client-v8 with GNU General Public License v3.0 4 votes vote down vote up
@Multipart @POST("store/set") Observable<BaseV7Response> editStore(
@Part MultipartBody.Part multipartBody,
@PartMap HashMapNotNull<String, okhttp3.RequestBody> body);
 
Example #21
Source File: ApiService.java    From LLApp with 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 #22
Source File: APIPostService.java    From smart-farmer-android with Apache License 2.0 4 votes vote down vote up
/**
 * 上传视频
 */
@Multipart
@POST("api")
Observable<HttpModel<JsonObject>> upload_video(@PartMap Map<String, RequestBody> partMap, @Part MultipartBody.Part file);
 
Example #23
Source File: APIPostService.java    From smart-farmer-android with Apache License 2.0 4 votes vote down vote up
/**
 * 上传图片
 */
@Multipart
@POST("api")
Observable<HttpModel<JsonObject>> upload_img(@PartMap Map<String, RequestBody> partMap, @Part MultipartBody.Part file);
 
Example #24
Source File: OctoApi.java    From octoandroid with GNU General Public License v3.0 4 votes vote down vote up
@Multipart
@POST("/api/files/{location}")
Observable<Object> uploadFile(@Path("location") String location, @Part MultipartBody.Part file);
 
Example #25
Source File: ApiManagerImpl.java    From octoandroid with GNU General Public License v3.0 4 votes vote down vote up
@Override
public Observable<Object> uploadFile(@Path("location") String location, @Part MultipartBody.Part file) {
    return mOctoApi.uploadFile(location, file);
}
 
Example #26
Source File: ApiService.java    From RetrofitImageUpload with Apache License 2.0 4 votes vote down vote up
@Multipart
@POST("upload.php")
Call<Result> uploadImage(@Part MultipartBody.Part file);
 
Example #27
Source File: PushoverEndpoints.java    From 600SeriesAndroidUploader with MIT License 4 votes vote down vote up
@Multipart
@POST("/1/messages.json")
Call<Message> postAttachment(@Part Message message, @Part MultipartBody.Part filePart);
 
Example #28
Source File: BaseApiService.java    From RetrofitClient with Apache License 2.0 4 votes vote down vote up
@POST("{url}")
Call<ResponseBody> uploadFiles(
        @Path("url") String url,
        @Path("headers") Map<String, String> headers,
        @Part("filename") String description,
        @PartMap() Map<String, RequestBody> maps);
 
Example #29
Source File: BaseApiService.java    From RetrofitClient with Apache License 2.0 4 votes vote down vote up
@Multipart
@POST("{url}")
Observable<ResponseBody> upLoadFile(
        @Path("url") String url,
        @Part("image\"; filename=\"image.jpg") RequestBody requestBody);
 
Example #30
Source File: GoogleDriveFileService.java    From narrate-android with Apache License 2.0 4 votes vote down vote up
@Multipart
@POST("/upload/drive/v3/files?uploadType=multipart")
Call<DriveFileMetadata> create(@Part("metadata") DriveFileMetadataRequest metadata,
                               @Part("entry") RequestBody file);