In order to consume a RESTful web service, we only have to create an interface with a few annotations to provide some metadata:
public interface SecurityApi
{
@POST("/api/public/auth")
Call<String> login(@Body Credentials credentials);
}
It's fairly simple to understand that the authentication endpoint uses the POST HTTP verb. This is available in the URI /api/public/auth, and it needs a Credentials object as the request body.