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,…
Author
Released
3/28/2017- 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
Duration
Views
Related Courses
-
PHP: Clean URLs on Apache Server
with David Powers1h 36m Intermediate -
PHP: Managing Persistent Sessions
with David Powers2h 41m Intermediate
-
Introduction
-
Welcome1m 2s
-
-
1. Guzzle Basics
-
Guzzle and HTTP5m 17s
-
What is REST?5m 46s
-
Installing Guzzle4m 6s
-
Our first Guzzle request6m 31s
-
-
2. Requests with Guzzle
-
Sending basic requests4m 43s
-
Sending concurrent requests3m 52s
-
Sending query data3m 5s
-
Sending request data4m 41s
-
-
3. Responses with Guzzle
-
Basic Guzzle responses4m 54s
-
Processing response headers7m 51s
-
Exceptions and Guzzle5m 13s
-
-
4. Guzzle and PSR-7
-
What is PSR-7?6m 24s
-
PSR-7 requests4m 59s
-
PSR-7 responses5m 14s
-
PSR-7 bodies3m 39s
-
PSR-7 headers5m 50s
-
PSR-7 streams6m 55s
-
PSR-7 middleware8m 39s
-
-
5. Testing and Guzzle
-
Basic Guzzle mock responses6m 29s
-
Guzzle request testing7m 14s
-
-
Conclusion
-
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?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake 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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Our first Guzzle request