GET Requests
GET Request:
When calling a get
method, two pieces of information are required:
The URL (This could also contain the query parameters)
The authentication token
Example:
The URL in this example is /events
Use the method ->authenticate()
to authenticate the user, so the token does not have to be passed in the request.
Example 2:
The value for “course_id” is 2 within the URL
The test does not call $this->actingAsAdmin()
because the user in the test is not user 1 (default administrator)
Last updated