In this video, Keith Casey discusses handling payloads and content negotiation including JSON.
- [Instructor] When we perform an action in our API,…the response code is vital.…But it's really only the first step.…If we want to understand what happened deeply,…we need to look at the body of the response itself.…In APIs, the content of the body will normally be JSON.…But it doesn't have to be.…In fact, as we build or use more complex APIs,…we may find JSON too limiting.…We need to move to another type of content entirely.…And that's how we get to Content Negotiation.…Content Negotiation is simply the process where a client…and server figure out which file formats they both speak.…
You may have had this experience in the real world…if you've ever traveled internationally.…The last time I approached the ticket counter…at the airport in Montreal, the agent said…Bonjour, hello.…Depending on how I respond,…she could continue the conversation without missing a beat.…Here's the best thing about this process.…We didn't have to coordinate or plan.…We worked it out during the normal course of communication.…Content Negotiation at a technical level…
This course begins with a simple application specification and builds it one step at a time. Each chapter includes a key concept, with examples from other public APIs, and then shows how to build it yourself with Silex. Learn about URL routing, validating input, and generating response codes and hypermedia payloads. Like any project, the first implementation may be a little messy, but don't worry. The last chapter covers refactoring and what it takes to scale and support the API going forward.
- Understanding the project goals
- Adding authentication with Silex
- Using cross-framework and authentication middleware
- Creating a read-write API in Silex
- Uploading files via an API
- Adding file security
- Creating payloads and response codes in Silex
- Scaling your API
Skill Level Beginner
PHP Date and Time Essential Trainingwith David Powers4h 31m Intermediate
Managing PHP Persistent Sessionswith David Powers2h 41m Intermediate
1. Project Explanation and Goals
2. Authentication Options and Tradeoffs
Cross framework middleware1m 32s
3. Create a Read-Write API
4. File Uploads via API
5. Scale Your API
Next steps1m 46s
- 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.