Fast-Android-Networking icon indicating copy to clipboard operation
Fast-Android-Networking copied to clipboard

Ask - How to upload multipart with method put

Open fahmisdk6 opened this issue 7 years ago • 4 comments

what i understand is upload() in this library is using method 'post'. how to change it to 'put' ?

fahmisdk6 avatar Apr 19 '18 04:04 fahmisdk6

Currently it does not support. We will add in the new release.

amitshekhariitbhu avatar Apr 19 '18 04:04 amitshekhariitbhu

Okay, Thank you for your quick response @amitshekhariitbhu

fahmisdk6 avatar Apr 19 '18 05:04 fahmisdk6

Hi, my proposal:

public class ANRequest<T extends ANRequest> { // Multipart builder constructor public ANRequest(MultiPartBuilder builder) { this.mRequestType = RequestType.MULTIPART; this.mMethod = builder.mMethod; ... } ... … public static class MultiPartBuilder<T extends MultiPartBuilder> implements RequestBuilder { private Priority mPriority = Priority.MEDIUM; private int mMethod = Method.POST; // New property ... } // Constructors public MultiPartBuilder(String url) { this.mUrl = url; this.mMethod = Method.POST; // DEFAULT } // New constructor public MultiPartBuilder(String url, int method) { this.mUrl = url; this.mMethod = method; } }

Thank you.

adesousabarroso avatar Aug 31 '18 11:08 adesousabarroso

@amitshekhariitbhu Hello Sir, Can you please update the Library Version so that we can use the MULTIPART Functionality with PUT Calls..

karagarwal avatar Jul 21 '22 13:07 karagarwal