On the page there is a small form:

<form method='post'><textarea name='xml' cols=70 rows=20></textarea><input type='submit'></form> <form method="post" enctype="multipart/form-data"> <input type="file" name="input" accept="xml" /> <input type="submit" value="Upload" /> </form> 

Question: how to send a file to the xml variable using a POST request? I use the library Retrofit 2 .

    1 answer 1

    The interface with the description of the method of sending xml will be like this:

     public interface FormService { @FormUrlEncoded @POST("form.php") Call<Void> createTask(@Field("xml") String xml); } 

    What to do with him I think you should already know if you are already using a retrofit.