<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Fri, 24 May 2013 16:34:31 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Matthew Weier O'Phinney: RESTful APIs with ZF2, Part 2]]></title>
      <guid>http://www.phpdeveloper.org/news/19180</guid>
      <link>http://www.phpdeveloper.org/news/19180</link>
      <description><![CDATA[<p>
<i>Matthew Weier O'Phinney</i> has posted the <a href="http://www.mwop.net/blog/2013-02-13-restful-apis-with-zf2-part-2.html">second part of his series</a> looking at creating RESTful APIs with the Zend Framework v2. In the <a href="http://phpdeveloper.org/news/19170">previous post</a> he covered some of the basics of data and structure. In this new article he looks at content types, status codes and two ways to represent them back to your users.
</p>
<blockquote>
In my <a href="http://www.mwop.net/blog/2013-02-11-restful-apis-with-zf2-part-1.html">last post</a>, I covered some background on REST and the Richardson Maturity Model, and some emerging standards around hypermedia APIs in JSON; in particular, I outlined aspects of Hypermedia Application Language (HAL), and how it can be used to define a generic structure for JSON resources. In this post, I cover an aspect of RESTful APIs that's often overlooked: reporting problems.
</blockquote>
<p>
He starts with some of the things around error handling and APIs that bother him and why just returning a status code representing an error isn't enough. He suggests two possible solutions to this issue - two messaging formats, API-Problem and vnd.error. He gives brief summaries of each and includes example output to give them some context.
</p>]]></description>
      <pubDate>Thu, 14 Feb 2013 09:15:06 -0600</pubDate>
    </item>
  </channel>
</rss>
