Join Justin Yost for an in-depth discussion in this video Our first Guzzle request, part of Consuming RESTful APIs in PHP with Guzzle.
- [Instructor] Let's build our first request with Guzzle.…To do so, first we'll go to our directory…that we created, RESTful.…Or you can open the directory for chapter one,…video four in the exercise files.…And we'll open a new blank document in our text editor…in this directory.…We'll open a new blank document in a text editor…and we'll name this document…first.php…for our first Guzzle request.…
To begin with, we need to load our composer auto loader.…To do so, on line one,…we first need to add our opening php tags.…And then on line two, we need to require…and then in quotes, we'll require the file name…at vendor forward slash…auto load dot php.…Note that if you're on Windows,…rather than it being vendor forward slash auto load,…it'll be vendor back slash auto load dot php.…
We'll then add a semicolon at the end of our line…and save this.…Composer uses an auto loader to load in the packages…that it recognizes.…We can then use the php keyword use…to say we want to use this class from this package.…On line three, we'll add in use, capital G,…
- Installing Guzzle
- Sending basic requests
- Sending asynchronous requests
- Sending concurrent requests
- Sending query data
- Sending request data
- Advanced Guzzle request options
- Reviewing basic Guzzle responses
- Processing response headers
- Reviewing PSR-7 requests, responses, bodies, and headers
Skill Level Intermediate
PHP: Clean URLs on Apache Serverwith David Powers1h 36m Intermediate
PHP: Managing Persistent Sessionswith David Powers2h 41m Intermediate
1. Guzzle Basics
2. Requests with Guzzle
3. Responses with Guzzle
4. Guzzle and PSR-7
5. Testing and Guzzle
Next steps1m 12s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.