Skip to content

Commit

Permalink
Add note about HEAD requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
serge-kvashnin committed Mar 24, 2024
1 parent 2f54b15 commit 67344d4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ $router->delete('/orders/{id}', 'delete_order_handler');
You can use these shortcut methods just like you would use the route method, but without the need to specify the HTTP
method as the first argument.

> [!IMPORTANT]
> The router only facilitates matching `HEAD` requests to `GET` routes when a specific `HEAD` handler is not found.
> Developers must explicitly ensure that `HEAD` method calls always return
> [empty response bodies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD).
## Tests

Run the PHPUnit tests to ensure that the package is functioning as expected:
Expand Down

0 comments on commit 67344d4

Please sign in to comment.