Hopefully, as we start to explore
some of the REST components of the Zend Framework, things will become clearer. That exploration will start
with Zend_Rest_Client
11.4.1 Zend_Rest_Client
The start of this section mentioned that Zend_Rest uses XML to serialize the data it processes in the body of
the HTTP request or response, however, not all RESTful web services use XML. One example is the Akismet
spam filtering service which we??™ll use to demonstrate the various ways of accessing REST based web services.
Figure 11.6 shows a good example of where we could use the service to check the reviews submitted by users
of our Places application.
Licensed to Menshu You
Zend Framework in Action (Ch01) Manning Publications Co. 30
Figure 11.6 The reviews in our Places application which we could filter using the Akismet spam filter service
Another reason we??™ve chosen Akismet is that Zend Framework has a Zend_Service_Akismet component
which means readers won??™t be left with a partially implemented solution but will hopefully be able to
understand how that component works a little more.
Resource Identifier Description
rest.akismet.com/1.1/verify-key Verify the required API key
api-key.rest.akismet.com/1.1/comment-check Identify the submitted comment is spam or not
api-key.
Pages:
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333