> For the complete documentation index, see [llms.txt](https://docs.elentra.org/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elentra.org/api/automated-testing/functional-tests/testing-http-verbs/get-requests.md).

# GET Requests

#### GET Request:

When calling a `get` method, two pieces of information are required:

1. The URL (This could also contain the query parameters)
2. The authentication token

**Example:**

```php
/**
 * Test that the GET /events returns 200
 *
 * @test
 * @return void
 */
public function events_get_method_index_returns_200(): void
{
	$this->actingAsAdmin()
          ->authenticate()
          ->get('/events');
}
```

The URL in this example is `/events`

{% hint style="success" %}
Use the method `->authenticate()` to authenticate the user, so the token does not have to be passed in the request.
{% endhint %}

**Example 2:**

```php
$this->actingAs(User::find(6))
  ->authenticate()
  ->get('/assessments/assessment-methods?course_id=2')
```

The value for “course\_id” is 2 within the URL

{% hint style="info" %}
The test does not call `$this->actingAsAdmin()` because the user in the test is not ***user 1*** (default administrator)
{% endhint %}
