Consuming RESTful APIs in PHP with Guzzle
2h 12mIntermediate2017-03-28
Authors

Justin Yost
Web Developer, Programmer
Course details
Guzzle—a PHP HTTP client—provides a simple interface for sending HTTP requests and receiving responses. In this course, learn how to write code using Guzzle to consume RESTful APIs. Instructor Justin Yost shows how to install Guzzle, send basic, asynchronous, and concurrent requests, and process responses, headers, and exceptions. He also shows how Guzzle works with PSR-7, the PHP community-provided specification that defines interfaces for HTTP messages. Plus, Justin shows how to test basic and advanced Guzzle mock responses.
Learning objectives
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
Learning objectives
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
Skills covered
GuzzlePHPAPIsBack-End Web DevelopmentFull-Stack Web DevelopmentWeb DevelopmentProgramming LanguagesOpen SourceSoftware Development
Concepts
0. Introduction
- 01 - Welcome
- 02 - What you should know before watching this course
- 03 - Using the exercise files
1. Guzzle Basics
- 04 - Guzzle and HTTP
- 05 - What is REST
- 06 - Installing Guzzle
- 07 - Our first Guzzle request
2. Requests with Guzzle
- 08 - Sending basic requests
- 09 - Sending asynchronous requests
- 10 - Sending concurrent requests
- 11 - Sending query data
- 12 - Sending request data
- 13 - Advanced Guzzle request options
3. Responses with Guzzle
- 14 - Basic Guzzle responses
- 15 - Processing response headers
- 16 - Exceptions and Guzzle
4. Guzzle and PSR-7
- 17 - What is PSR-7
- 18 - PSR-7 requests
- 19 - PSR-7 responses
- 20 - PSR-7 bodies
- 21 - PSR-7 headers
- 22 - PSR-7 streams
- 23 - PSR-7 middleware
5. Testing and Guzzle
- 24 - Basic Guzzle mock responses
- 25 - Advanced Guzzle mock responses
- 26 - Guzzle request testing
Conclusion
- 27 - Next steps