I designed an API that sends data in parameters, however retrofit prevents us from sending data in parameters through a post request. Is there a way to send data in parameters through a post request with retrofit?
Question posted in Android Studio
The official documentation can be found here.
The official documentation can be found here.
2
Answers
Reference:
https://square.github.io/retrofit/2.x/retrofit/retrofit2/http/Field.html
You can make a Pojo/Data class for your desired parameters and Then you can make an object by passing all your parameter. Then you can send data through post by using @Body tag like: