The methods dealing with URL accept / return a raw path (% encoded):
* getBasePath
* getBaseUrl
* getPathInfo
* getRequestUri
* getUri
* getUriForPath
use Symfony\Component\HttpFoundation\Request; $request = Request::createFromGlobals(); $name = $request->query->get('name');
use Symfony\Component\HttpFoundation\Request; $request = Request::createFromGlobals(); $username = $request->request->get('username'); $password = $request->request->get('password');
use Symfony\Component\HttpFoundation\Request; $request = Request::createFromGlobals(); if ($request->isMethod('POST')) { // Handle Post Request }This code checks if the request is a POST request. Overall, the Request class from Symfony\Component\HttpFoundation package provides convenient and easy-to-use methods for accessing various aspects of an HTTP request.