How to send a "POST request" with a photo field?
This field must contain an image in the format "multipart / form-data" to upload photos through the API "Vkontakte"?
Which library is best to use?
How to send a "POST request" with a photo field?
This field must contain an image in the format "multipart / form-data" to upload photos through the API "Vkontakte"?
Which library is best to use?
For the organization of work with the server is the favorite library of many Retrofit . But Retrofit is valuable only if data structures come to the server in JSON or XML, which need to be parsed for work.
When transferring binary data back and forth, Retrofit will interfere, in this case it is worth using a pure HTTP client, without any dodger. Take OkHttp .
There are enough examples in the OkHttp documentation, there you will find the one that fits your needs: https://github.com/square/okhttp/wiki/Recipes
Source: https://ru.stackoverflow.com/questions/623908/
All Articles