Well, that might be a simple question but, in my app I have to upload some data to a server, it will be some user images (3 or 4) together with some other user data (name, pass, age, etc..).
For that I will be using Volley, and from the answer HERE I have been reading about using a MultipartRequest
.
However, I am not sure about the difference, or the benefit of using a MultipartRequest
if in the usual StringRequest
I have the method getParams
where I could do like that:
override fun getParams(): Map<String, String> {
val params = HashMap<String, String>()
params.put("image1", encodedImage1Base64)
params.put("image2", encodedImage2Base64)
params.put("image3", encodedImage3Base64)
params.put("image4", encodedImage4Base64)
params.put("user_name", userName)
params.put("user_pass", userPass)
params.put("user_age", userAge)
params.put("user_email", userEmail)
// and any other user data needed
return params