How to pass string in 'Body' Parameter of Retrofit 2 in android
Convert your data in object
public class Credentials{ public String email; public String password;}
Set the data to object
Credentials loginCredentials = new Credentials();loginCredentials.email = "test@gmail.com";loginCredentials.password = "password";
Call your api
@POST("api/login")Call<ApiResponse> loginUser(@Body Credentials credentials);