use Illuminate\Http\Request; $request = Request::createFromGlobals(); $value = $request->input('param');
$headers = $request->header();
use Illuminate\Http\Client\Factory; $http = new Factory(); $response = $http->get('http://example.com/api'); $data = $response->json();This code creates a new HTTP client using the `Factory` class, makes a GET request to the `http://example.com/api` endpoint, and then gets the JSON data from the response using the `json` method.