With such a powerful framework, the development documentation doesn't tell you how to access third-party APIs with HTTP requests.
At present, Baidu comes out of several programs:
1. This program will be reported notfoundhttpexception, roughly debugging, as if the input route is not legal, there is no document to say how these 2 methods are used.
$req = Request::create('http://localhost:1920/api/User/GetUser','GET');$resp = Route::dispatch($req);
2. Using the curl frame, this should be possible, is not very want to use, want to use laravel built-in.
3. Using the guzzle framework, someone said that Laravel built the framework, but couldn't find it.
Reply content:
With such a powerful framework, the development documentation doesn't tell you how to access third-party APIs with HTTP requests.
At present, Baidu comes out of several programs:
1. This program will be reported notfoundhttpexception, roughly debugging, as if the input route is not legal, there is no document to say how these 2 methods are used.
$req = Request::create('http://localhost:1920/api/User/GetUser','GET');$resp = Route::dispatch($req);
2. Using the curl frame, this should be possible, is not very want to use, want to use laravel built-in.
3. Using the guzzle framework, someone said that Laravel built the framework, but couldn't find it.
Curl is already strong, laravel there's no need to build an HTTP tool.
As for guzzle, add in your Composer.json, then update
"guzzlehttp/guzzle": "~5.3|~6.0"
All of Laravel ' s extensions----->composer!