Authentication endpoint client

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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.7.208