-
Notifications
You must be signed in to change notification settings - Fork 1
Testing API Calls
Ele edited this page Mar 21, 2018
·
1 revision
It is important to QA your methods before submitting a PR. I recommend downloading an API development/testing tool, such as Postman.
To test API calls as a specific user/role, you will need to request a bearer token and submit it with subsequent API calls.
First make the following call:
POST yourlocalhost/token
x-www-form-urlencoded
BODY:
grant_type: password
username: The Username
password: The Password
This should return an "access_token" in the HTTP response.
Then, in future API calls that you want to make as this user, attach this token to the Header like so:
Authorization: bearer TheTokenGoesHere...