Add consistency with request type checking
minor #12492 [HttpKernel] Add consistency with request type checking (blanchonvincent)

This PR was submitted for the master branch but it was merged into the 2.5 branch instead (closes #12492).

Discussion
----------

[HttpKernel] Add consistency with request type checking

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

1852f85 Add consistency with request type checking