$request = new Request($_GET, $_POST, [], $_COOKIE, $_FILES, $_SERVER); if ($request->has('sendId')) { $sendId = $request->get('sendId'); // Do something with the sendId }
use GuzzleHttp\Client; $client = new Client(); $response = $client->request('GET', 'https://example.com/api', [ 'query' => ['sendId' => '1234'] ]); $body = $response->getBody(); // Do something with the response bodyThis code uses the GuzzleHttp package to send an HTTP GET request to an API endpoint with the "sendId" parameter set to 1234. It then retrieves the response body and does something with it. Package library used in these examples is the default PHP library.