: This article describes how to send HTTP requests using guzzule6 in php. if you are interested in the PHP Tutorial, refer to it. Guzzle is upgraded to version 6 without knowing it. after the upgrade, it is used differently from the original version 3. *. after reading the document, I am confused. after searching for it for a long time, I found the usage in the document:
POST
$ Response = $ client-> request ('post', 'http: // httpbin.org/post', ['form _ params '=> ['Field _ name' => 'ABC ', 'Oss _ field' => '123', 'nested _ field' => ['nested '=> 'hello']); $ result = $ response-> getBody ();
GET
$ Client = new Client (); $ res = $ client-> request ('GET', $ url ."? Param1 = 1 & param2 = 9 "); $ result = $ res-> getBody ();
It is quite convenient to make sense.
'). AddClass ('pre-numbering '). hide (); $ (this ). addClass ('Has-numbering '). parent (). append ($ numbering); for (I = 1; I <= lines; I ++) {$ numbering. append ($ ('
'). Text (I) ;}; $ numbering. fadeIn (1700) ;}) ;}; script
The above describes how php uses guzzule 6 to send HTTP requests, including some content. I hope to be helpful to anyone interested in PHP tutorials.