retrofit2.http.Multipart Java Examples
The following examples show how to use
retrofit2.http.Multipart.
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: AnimePictures.java From MoeGallery with GNU General Public License v3.0 | 5 votes |
@Multipart @POST("/login/submit") Call<AnimePicturesUser> login( @Part("login") RequestBody username, @Part("password") RequestBody password, @Part("time_zone") RequestBody timezone );
Example #2
Source File: DoorbellService.java From maoni with MIT License | 5 votes |
@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 File: DoorbellService.java From maoni with MIT License | 5 votes |
@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: V7.java From aptoide-client-v8 with GNU General Public License v3.0 | 4 votes |
@Multipart @POST("user/set") Observable<BaseV7Response> editUser( @Part MultipartBody.Part user_avatar, @PartMap HashMapNotNull<String, okhttp3.RequestBody> body);
Example #5
Source File: FileResourceService.java From dhis2-android-sdk with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Multipart @POST(FILE_RESOURCES) Call<ResponseBody> uploadFile(@Part MultipartBody.Part filePart);
Example #6
Source File: MyRetrofitTest.java From zone-sdk with MIT License | 4 votes |
@Multipart @POST("log") Call<Data> sendFile(@Part(value = "myFile",encoding = "utf-8") RequestBody file);
Example #7
Source File: NextcloudRetrofitServiceMethod.java From Android-SingleSignOn with GNU General Public License v3.0 | 4 votes |
private void parseMethodAnnotation(Annotation annotation) { if (annotation instanceof DELETE) { parseHttpMethodAndPath("DELETE", ((DELETE) annotation).value(), false); } else if (annotation instanceof GET) { parseHttpMethodAndPath("GET", ((GET) annotation).value(), false); } else if (annotation instanceof POST) { parseHttpMethodAndPath("POST", ((POST) annotation).value(), true); } else if (annotation instanceof PUT) { parseHttpMethodAndPath("PUT", ((PUT) annotation).value(), true); } else if (annotation instanceof HEAD) { parseHttpMethodAndPath("HEAD", ((HEAD) annotation).value(), false); } else if (annotation instanceof HTTP) { HTTP http = (HTTP) annotation; parseHttpMethodAndPath(http.method(), http.path(), http.hasBody()); } else if (annotation instanceof Multipart) { if (isFormEncoded) { throw methodError(method, "Only one encoding annotation is allowed."); } isMultipart = true; } else if (annotation instanceof FormUrlEncoded) { if (isMultipart) { throw methodError(method, "Only one encoding annotation is allowed."); } isFormEncoded = true; } else if (annotation instanceof Streaming) { Log.v(TAG, "streaming interface"); } else if (annotation instanceof retrofit2.http.Headers) { String[] headersToParse = ((retrofit2.http.Headers) annotation).value(); if (headersToParse.length == 0) { throw methodError(method, "@Headers annotation is empty."); } headers = parseHeaders(headersToParse); } else if(annotation instanceof FormUrlEncoded) { //formUrlEncoded = true; Log.v(TAG, "FormUrlEncoded request"); } else if(annotation instanceof NextcloudAPI.FollowRedirects) { followRedirects = true; } else { throw new UnsupportedOperationException(String.valueOf(annotation)); } }
Example #8
Source File: ForumService.java From TLint with Apache License 2.0 | 4 votes |
@POST("img/Imgup") @Multipart Observable<UploadData> upload(@Part MultipartBody.Part file, @PartMap Map<String, RequestBody> params);
Example #9
Source File: GhostApiService.java From quill with MIT License | 4 votes |
@Multipart @POST("uploads/") Call<JsonElement> uploadFile(@Header("Authorization") String authHeader, @Part MultipartBody.Part file);
Example #10
Source File: Example9.java From AnDevCon-RxPatterns with Apache License 2.0 | 4 votes |
@Multipart @POST("/upload/drive/v2/files?uploadType=media") Observable<UploadResponse> mediaUpload( @Part("file") RequestBody mediaFile, @Header("Content-Type") String headerContentType );
Example #11
Source File: ZulipServices.java From zulip-android with Apache License 2.0 | 4 votes |
@Streaming @Multipart @POST("v1/user_uploads") Call<UploadResponse> upload(@Part MultipartBody.Part file);
Example #12
Source File: MyRetrofitTest.java From zone-sdk with MIT License | 4 votes |
@Multipart @POST ("log") Call<Data> sendFiles (@PartMap Map<String, RequestBody> params);
Example #13
Source File: AnimePictures.java From MoeGallery with GNU General Public License v3.0 | 4 votes |
@Multipart @POST("/pictures/autocomplete_tag") Call<AnimePicturesTagList> tag( @Part("tag") RequestBody tags );
Example #14
Source File: HupuForumApi.java From SprintNBA with Apache License 2.0 | 4 votes |
@POST("img/Imgup") @Multipart void upload(@Part("file") MultipartBody.Part file, @PartMap Map<String, RequestBody> params);
Example #15
Source File: HttpUploadService.java From RxjavaRetrofitDemo-string-master with MIT License | 4 votes |
@Multipart @POST("AppYuFaKu/uploadHeadImg") Observable<String> uploadImage(@Part("uid") RequestBody uid, @Part("auth_key") RequestBody auth_key, @Part MultipartBody.Part file);
Example #16
Source File: Service.java From aptoide-client-v8 with GNU General Public License v3.0 | 4 votes |
@POST("createUser") @Multipart Observable<BaseV3Response> createUserWithFile( @Part MultipartBody.Part user_avatar, @PartMap() HashMapNotNull<String, RequestBody> args, @Header(WebService.BYPASS_HEADER_KEY) boolean bypassCache);
Example #17
Source File: ApiService.java From journaldev with MIT License | 4 votes |
@Multipart @POST("/upload") Call<ResponseBody> postImage(@Part MultipartBody.Part image, @Part("upload") RequestBody name);
Example #18
Source File: V7.java From aptoide-client-v8 with GNU General Public License v3.0 | 4 votes |
@Multipart @POST("store/set") Observable<BaseV7Response> editStore( @Part MultipartBody.Part multipartBody, @PartMap HashMapNotNull<String, okhttp3.RequestBody> body);
Example #19
Source File: ApiService.java From LLApp with Apache License 2.0 | 4 votes |
@Multipart @POST("api/user/modifyDevice") Observable<BaseResponse> uploadImage(@PartMap Map<String, RequestBody> map, @Part MultipartBody.Part file);
Example #20
Source File: APIPostService.java From smart-farmer-android with Apache License 2.0 | 4 votes |
/** * 上传视频 */ @Multipart @POST("api") Observable<HttpModel<JsonObject>> upload_video(@PartMap Map<String, RequestBody> partMap, @Part MultipartBody.Part file);
Example #21
Source File: APIPostService.java From smart-farmer-android with Apache License 2.0 | 4 votes |
/** * 上传图片 */ @Multipart @POST("api") Observable<HttpModel<JsonObject>> upload_img(@PartMap Map<String, RequestBody> partMap, @Part MultipartBody.Part file);
Example #22
Source File: OctoApi.java From octoandroid with GNU General Public License v3.0 | 4 votes |
@Multipart @POST("/api/files/{location}") Observable<Object> uploadFile(@Path("location") String location, @Part MultipartBody.Part file);
Example #23
Source File: ApiService.java From RetrofitImageUpload with Apache License 2.0 | 4 votes |
@Multipart @POST("upload.php") Call<Result> uploadImage(@Part MultipartBody.Part file);
Example #24
Source File: PushoverEndpoints.java From 600SeriesAndroidUploader with MIT License | 4 votes |
@Multipart @POST("/1/messages.json") Call<Message> postAttachment(@Part Message message, @Part MultipartBody.Part filePart);
Example #25
Source File: BaseApiService.java From RetrofitClient with Apache License 2.0 | 4 votes |
@Multipart @POST("{url}") Observable<ResponseBody> upLoadFile( @Path("url") String url, @Part("image\"; filename=\"image.jpg") RequestBody requestBody);
Example #26
Source File: GoogleDriveFileService.java From narrate-android with Apache License 2.0 | 4 votes |
@Multipart @POST("/upload/drive/v3/files?uploadType=multipart") Call<DriveFileMetadata> create(@Part("metadata") DriveFileMetadataRequest metadata, @Part("entry") RequestBody file);
Example #27
Source File: FourChanPostApi.java From mimi-reader with Apache License 2.0 | 4 votes |
@Multipart @POST("auth") Single<Response<ResponseBody>> login(@Part("id") RequestBody token, @Part("pin") RequestBody pin, @Part("long_login") RequestBody longLogin, @Part("act") RequestBody act);
Example #28
Source File: FourChanPostApi.java From mimi-reader with Apache License 2.0 | 4 votes |
@Multipart @POST("{boardName}/post") Single<Response<ResponseBody>> post(@Path("boardName") String boardName, @PartMap Map<String, RequestBody> param);
Example #29
Source File: SellService.java From STUer-client with MIT License | 4 votes |
@Multipart @POST("create/photo") Observable<ResponseBody> addRecordWithPhoto(@Part("photo") RequestBody photo, @Part("info") SellInfo baseInfo);
Example #30
Source File: UploadService.java From appcenter-plugin with MIT License | 4 votes |
@Multipart @POST CompletableFuture<Void> uploadApp(@Url @Nonnull String url, @Part @Nonnull MultipartBody.Part file);