android - Uploading a File using Volley API via PUT method -


i've been looking way upload file using volley api using put method. i've seen far through multipart post method aren't applicable case.

assuming can't change on server side , i'm stuck using put. how achieve in volley?

note have url upload file , file itself.

use basic concept of put method

url = "your url";  stringrequest putrequest = new stringrequest(request.method.put, url,  new response.listener<string>()  {     @override     public void onresponse(string response) {         // response         log.d("response", response);     } },  new response.errorlistener()  {      @override      public void onerrorresponse(volleyerror error) {                      // error          log.d("error.response", response);    } }){  @override protected map<string, string> getparams()  {           map<string, string>  params = new hashmap<string, string> ();           params.put("name", "file_name");            return params;   } }; requestqueue queue = volley.newrequestqueue(this); queue.add(putrequest); 

Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -