Skip to content

Commit

Permalink
更新文件上传参数
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanxiaotian committed Nov 19, 2018
1 parent 19bb85d commit 076b19f
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
package com.cangmaomao.network.request.service;

import com.cangmaomao.network.request.BaseBean;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;
import retrofit2.http.Streaming;
import retrofit2.http.Url;

public interface APIFunction {

@POST
@Multipart
Observable<ResponseBody> uploadFile(@Url String url, @Part("file\"; filename=\"avatar.png\"") RequestBody requestBody, @PartMap Map<String, RequestBody> map);
Observable<ResponseBody> uploadFile(@Url String url, @Part("fileName\"; filename=\"test.png") RequestBody requestBody, @PartMap Map<String, RequestBody> map);

@POST
@Multipart
Observable<ResponseBody> uploadFile(@Url String url, @Part("file\"; filename=\"avatar.png\"") RequestBody requestBody);
Observable<ResponseBody> uploadFile(@Url String url, @Part("fileName\"; filename=\"test.png") RequestBody requestBody);

@GET
Observable<ResponseBody> download(@Url String url);
Expand Down

0 comments on commit 076b19f

Please sign in to comment.