October 2016
Intermediate to advanced
320 pages
6h 39m
English
So far, our web service can perform the basic operations on a user profile. In this chapter, we will extend the user profile service to also handle a user's profile image. During the course of this chapter, you will learn how you can process even very large files using PHP streams.
Basically, in a RESTful application, you can treat an image just as any other resource. You can create and update it using POST and/or PUT operations, and you can retrieve it using GET. The only difference is the chosen representation of the resource. Instead of JSON encoding using application/json as a Content-Type, you will now work with resources that have a JPEG or PNG representation, with their respective image/jpeg or ...
Read now
Unlock full access