Join Justin Yost for an in-depth discussion in this video Guzzle request testing, part of Consuming RESTful APIs in PHP with Guzzle.
- [Instructor] Our final lesson on testing in Guzzle…is going to cover sending out requests…and verifying that those requests were sent.…After all, if you are testing in API,…you want to verify not just that the API responses…are processed correctly,…but also that you can verify that any API requests…were sent out correctly.…In case you haven't already realized it by now,…this will again require the use of some middleware.…To begin, we'll set up a new file called history.php.…
And we'll start like we always do,…with our opening PHP tags.…And the require autoload line.…And like we have normally with most of our files,…we're going to need to work with an instance…of the client object,…so we'll add on line three,…use Guzzle http…backslash client.…After that, to build out our middleware stack,…we'll need the handler stack object.…So line four will read as use Guzzle http…backslash handler stack.…
Our last use line is going to be loading in the middleware.…So line five will read as use Guzzle http…backslash middleware,…
- 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?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.