How can I get authorization token in rest API using rest assured? Is it possible?

Viewed 17658

Currently using Postman I have to do post request to API_URL/login and I pass username and password and in return i get token see below:

Example Request:

/login
POST
Body
{
    "username": "admin",
    "password": "admin"
}
Return
{
    "token": "1234-56789-..."
}

Can you tell me how would I do .. i tried using .parameters but it says deprecated...

2 Answers
Related