Join Justin Yost for an in-depth discussion in this video PSR-7 streams, part of Consuming RESTful APIs in PHP with Guzzle.
- [Instructor] Psr7 streams are the way…Guzzle passes around and stores message bodies.…Streams are a way of working with a set of data…in a standard interface that provides the ability…for us to access data that is larger…than our available memory space.…Imagine you have a computer…with only a thousand bytes of memory,…and you have an http message…with 1500 bytes in the message body.…If you tried to read that message…right away and all at once,…your computer would crash.…streams allow us to solve this particular problem.…
Let's build some streams now to see this in action.…To do this we'll open up our editor…and we'll create a new file,…and we'll name this file as psr7streams.php.…And to begin we will begin like we generally need to…by first opening up our php open tags…and then we'll add in our require vendor/autoload.php…and now we can load in the Psr stream interface…from Guzzle with use Guzzle http\Psr7.…
After this we can generate a stream.…There are a few ways we can create a stream.…We can first pass in a stream,…
- 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 35m 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.