how to automate api using rest assured code example
Example: rest assured script
The syntax of Rest Assured.io is the most beautiful part, as it is very
BDD like and understandable.
Given(). (lets you set a background)
param("customer_id", "102").
header("z", "w").
when(). (marks the premise of your scenario. For ex: get url)
Method(). (replace it with any of CRUD operations like get post put delete)
Then(). (your assert and matcher conditions goes here)
statusCode(xxx).
Body("x, "y", equalTo("z"));