<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Cary Reams</title>
    <description>The latest articles on DEV Community by Cary Reams (@carywreams).</description>
    <link>https://dev.to/carywreams</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F10829%2F409739.jpeg</url>
      <title>DEV Community: Cary Reams</title>
      <link>https://dev.to/carywreams</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/carywreams"/>
    <language>en</language>
    <item>
      <title>RESTful and Summary Resource Paths</title>
      <dc:creator>Cary Reams</dc:creator>
      <pubDate>Wed, 23 May 2018 11:59:51 +0000</pubDate>
      <link>https://dev.to/carywreams/restful-and-summary-resource-paths-28gm</link>
      <guid>https://dev.to/carywreams/restful-and-summary-resource-paths-28gm</guid>
      <description>&lt;p&gt;I'm a big fan of RESTful approach to defining paths and accessing resources. The struggle today is how to approach what I refer to as "summary" resources. &lt;/p&gt;

&lt;p&gt;For example, if the desire were to provide the current standings for a sports league - teams, wins, losses, games-behind, winning-percentage - how would that path be defined ?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;/sportsleague/standings ?&lt;/li&gt;
&lt;li&gt;/sportsleague/standing ?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What if there are multiple "formats" of similar information ? &lt;/p&gt;

&lt;p&gt;What if the first were standings within a conference, but the second format were playoff standings (see USA's National Basketball Association) that completely ignore individual conferences (subsets).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;/sportsleague/standing(s?) and /sportsleague/playoffstanding(s?) ?&lt;/li&gt;
&lt;li&gt;/sportsleague/standing/conference and /sportsleague/standing/playoff&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For added complexity, consider a third report that considers additional at-large playoff spots (see USA's Major League Baseball or National Football League's "wildcard" standings concept)? The games behind metric still means the same thing, but its been adjusted to consider who "leads" the wild card chase. Rather than meaning "games out of first place," it comes to mean "games out of the playoffs" and is therefore based on the "last wildcard team" not the "first wildcard team." That's all a long way of saying the calculation is different, but the presentation structure is the same.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;(from above) ... and /sportsleague/playoffstandingwildcard(s?) ?&lt;/li&gt;
&lt;li&gt;(from above) ... and /sportsleague/standing/wildcard ?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;More generally, if this is just one of a number of summary reports, would we toss all reports into a category and nest specifics within the reports category ?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;/sportsleague/report/standing/conference&lt;/li&gt;
&lt;li&gt;/sportsleague/report/standing/playoff&lt;/li&gt;
&lt;li&gt;/sportsleague/report/player/17/career&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But in this case, the application of a "report resource" would seem to be non-beneficial. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;/sportsleague/standing/conference&lt;/li&gt;
&lt;li&gt;/sportsleague/standing/playoff&lt;/li&gt;
&lt;li&gt;/sportsleague/player/17/career&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The real context for my question revolves around attempting to define RESTful paths to many different statistical reports which all use the same core data, but perform subtly different analysis for consumption by the user.&lt;/p&gt;

&lt;p&gt;For example, we have (at least) three different reports which compose a list of people and their top five talents into a matrix sorted by various (non-trivial)  criteria - the different criteria are the source of the different reports. I'm having difficulty defining the paths to access the data.&lt;/p&gt;

&lt;p&gt;Looking forward to reading your suggestions and answering any clarifying questions. And if I've started off on the wrong foot conceptually (it happens), please point me off in another direction that has something better to offer.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br&gt;
Cary&lt;/p&gt;

</description>
      <category>rfc</category>
      <category>rest</category>
      <category>restful</category>
      <category>discuss</category>
    </item>
    <item>
      <title>RESTful without HTTP Verbs </title>
      <dc:creator>Cary Reams</dc:creator>
      <pubDate>Tue, 09 Jan 2018 16:56:37 +0000</pubDate>
      <link>https://dev.to/carywreams/restful-without-http-verbs-2i</link>
      <guid>https://dev.to/carywreams/restful-without-http-verbs-2i</guid>
      <description>

&lt;p&gt;&lt;strong&gt;Update 2&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;From the comments below, several very interesting resources have surfaced. The most damning of these articles is an &lt;a href="http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven"&gt;nine-year-old bog entry&lt;/a&gt; by Roy Fielding (father of REST). This quote appears:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What needs to be done to make the REST architectural style clear on the notion that hypertext is a constraint? In other words, if the engine of application state (and hence the API) is not being driven by hypertext, then it cannot be RESTful and cannot be a REST API. Period. Is there some broken manual somewhere that needs to be fixed?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So, categorically, unless we are using HTTP to directly manage state - and not merely as a messaging layer - we are not RESTful.&lt;/p&gt;

&lt;p&gt;Point taken.&lt;/p&gt;

&lt;p&gt;Kudos to the comment from &lt;a href="https://dev.to/kspeakman"&gt;Kasey Speakman&lt;/a&gt; which included the link to Martin Fowler's article on the &lt;a href="https://martinfowler.com/articles/richardsonMaturityModel.html"&gt;Richardson Maturity Model&lt;/a&gt; (RMM) which lead to the Fielding entry.&lt;/p&gt;

&lt;p&gt;Also thanks to all those with constructive comments that helped square away my understanding of a RESTful architecture. While I don't care for the coupling that comes from intertwining the app with the protocol used to communicate between client and server, its clear that decoupling those items _violates the intended definition of REST.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where to go from here?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not sure yet. I owe it to myself to take a look at the "HATEOAS (Hypertext As The Engine Of Application State)" mentioned in the Fowler article on RMM. I need to reconcile the dual role of HTTP to provide both transport and management of application state.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;/Update 2&lt;/strong&gt;&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;note bene: I'm really looking forward to comments that begin, "What about...," or "In addition, ..." as its a great benefit to enumerate additional considerations. Thanks&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Context
&lt;/h1&gt;

&lt;p&gt;We develop and operate a private web portal for clients. That portal allows clients to login, save information, license intellectual property, and generate highly customized,  print-ready PDFs for use in their business. As such, the API is not open and we do not integrate with other apps or services. The lack of such integration grossly simplifies what we need to do as it eliminates many of the normal benefits received by following the current convention. That said, ...&lt;/p&gt;

&lt;h1&gt;
  
  
  Rejected Premise
&lt;/h1&gt;

&lt;p&gt;A faithful RESTful implementation necessitates use of appropriate HTTP verbs.&lt;/p&gt;

&lt;h1&gt;
  
  
  Initial Motivation
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;update 1&lt;/strong&gt;&lt;br&gt;
this motivation is no longer a concern. However, I'm not finished chewing on the bone I found.&lt;br&gt;
&lt;strong&gt;/update 1&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;del&gt;The reason for pursuing this line of thought at all was out of concern for reducing the amount of information exposed in server log files. So, it began &lt;br&gt;
more as a curiosity than as a possible solution to a specific problem. To that end, this reads better as &lt;em&gt;thinking out loud&lt;/em&gt; rather than a manifesto for revolution.&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;&lt;del&gt;If I'm using the usual and customary RESTful implementation, the path (but naturally not the non-GET payloads) appears in the server logs. A reasonable application of knowledge and an exposure in authored or incorporated software could lead to a breach.&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;&lt;del&gt;While I like the idea of being able to scrape server logs for intelligence, in practice I just don't do it. There are other, more intelligent means by which to gain that kind of insight regarding usage.&lt;/del&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;del&gt;Therefore, information is being exposed without offering any value in return for the perceived risk.&lt;/del&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  TL;DR
&lt;/h1&gt;

&lt;p&gt;The client-side software and the server-side software don't &lt;em&gt;require&lt;/em&gt; the use of HTTP Verbs to communicate intent -- those two pieces can communicate with each other, provided the browser and web server can communicate.&lt;/p&gt;

&lt;p&gt;ergo, we require only that the communications are successful; and ask the browser and web server (Apache, iis, nginx, etc) to provide the comm link or information about why the comm link is unavailable. &lt;em&gt;That's their job, let them do it. But don't ask them to take on responsibility for the entire solution.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The alternative: encapsulate solution-specific server-side response codes and data   within the payload.&lt;/p&gt;

&lt;p&gt;To that end, we elect to simply prefer the POST method with a message header and message body to communicate intent currently conveyed via HTTP verbs. We accept use of the GET verb where we don't mind exposing our RESTful structure (...or wish to permit bookmarks or support caching).&lt;/p&gt;

&lt;p&gt;The message header contains two field (hidden inputs, if you will):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;request_type : New | Create | Edit | Update | Show | List | Delete&lt;/li&gt;
&lt;li&gt;request_path :  /resource/id/resource2/id2/...&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The message body contains all the usual suspects.&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*---------------*
| request_type  |
| request_path  |
+---------------+
| field1        |
| field2        |
| ...           |
| fieldN        |
*---------------*
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Solution-specific, server-side responses are provided with a response header and response body. The response header takes on the responsibility for conveying the status of the request (replacing use of HTTP status codes formerly used for this purpose) while the response body contains any requested data as per usual.&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTTP headers, ...
HTTP_STATUS: 200, 400, 404
data:
*------------------*
| response_status  |
+------------------+
| field1           |
| field2           |
| ...              |
| fieldN           |
*------------------*

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I think this decouples the various browsers and web servers from my client code and server-side code. I still have to use POST and GET, but I &lt;em&gt;only&lt;/em&gt; have to use POST and GET. And GET could be optional and rare, since I still want to eliminate information from server logs. &lt;/p&gt;

&lt;h2&gt;
  
  
  Risks
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Caching&lt;/strong&gt; will be affected by using POST where GET is a legitimate candidate; to be investigated&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bookmarking&lt;/strong&gt; will be affected by using POST where GET is a legitimate candidate; to be investigated&lt;/li&gt;
&lt;li&gt;Currently accepted &lt;strong&gt;principles&lt;/strong&gt; will be violated by using POST where GET is a legitimate candidate; tradeoffs will be evaluated&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  STL;BIC
&lt;/h1&gt;

&lt;p&gt;(Still too long; but I'm curious)&lt;/p&gt;

&lt;p&gt;Here's a thought process that was radial and branching in nature, but had to be tortured into a linear space, here.&lt;/p&gt;

&lt;h2&gt;
  
  
  What good are you?
&lt;/h2&gt;

&lt;p&gt;I've spent a few years torturing our web app from a hacked solution towards a more  RESTful solution. I love the simplicity of the relative path address path and the nature of the seven operations - eight for us, since I've got a parking lot item to handle search as a first-class request.&lt;/p&gt;

&lt;p&gt;But during that time, I've struggled with the implementation of HTTP verbs and REST. Put simply, HTML doesn't support use of all VERBs. Form methods may only be GET or POST and one can fairly ask why support GET. However, the PUT, PATCH, and DELETE options are not supported. &lt;/p&gt;

&lt;p&gt;Barring some unknown consideration, it makes sense to me that the HTML form spec allow for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;method=POST to create a resource&lt;/li&gt;
&lt;li&gt;method=PATCH to update a resource&lt;/li&gt;
&lt;li&gt;method=PUT to replace a resource&lt;/li&gt;
&lt;li&gt;method=DELETE to delete resource &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;...but that's not available to us. To overcome this limitation, browser vendors and javascript libraries would have to start moving in the same direction together (stop laughing).  I suppose its possible I'm expecting HTML to support something that it was never intended or anticipated to support - maybe the PATCH|PUT|DELETE ops are intended for server-to-server communications ?? Not sure. But I know I have use for them. They aren't there natively. The exercise to overcoming the native absence seems thankless and costly. &lt;/p&gt;

&lt;p&gt;...and even if we did attach some javascript and a library to manage ajax communications to change the method to an appropriate VERB, ...my apache server processes it as a POST request and the data must be obtained from the PHP::_POST array anyway. Which means I must infer from other information the POST|PUT|PATCH|DELETE operation (aside from some cases where the verb is preserved in the comms overhead).&lt;/p&gt;

&lt;p&gt;So &lt;em&gt;what good are you?&lt;/em&gt; we jumped through some hoops only to have my intentions squashed on the server. No thanks. &lt;/p&gt;

&lt;h2&gt;
  
  
  HTTP Status Codes
&lt;/h2&gt;

&lt;p&gt;Found this &lt;a href="http://www.restapitutorial.com/lessons/httpmethods.html"&gt;resource&lt;/a&gt; which nicely captures the use of HTTP status codes to response to HTTP verbs. However, the vast majority have more to do with app response than web server communications response to the browser:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;HTTP verb&lt;/th&gt;
&lt;th&gt;status code&lt;/th&gt;
&lt;th&gt;App Scope&lt;/th&gt;
&lt;th&gt;Web Server Scope&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;POST (create)&lt;/td&gt;
&lt;td&gt;201 created&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;POST&lt;/td&gt;
&lt;td&gt;404 not found&lt;/td&gt;
&lt;td&gt;Maybe&lt;/td&gt;
&lt;td&gt;Maybe&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;POST&lt;/td&gt;
&lt;td&gt;409 conflict&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GET (read)&lt;/td&gt;
&lt;td&gt;200 (OK)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GET&lt;/td&gt;
&lt;td&gt;404&lt;/td&gt;
&lt;td&gt;Maybe&lt;/td&gt;
&lt;td&gt;Maybe&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PUT (update/replace)&lt;/td&gt;
&lt;td&gt;200&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PUT&lt;/td&gt;
&lt;td&gt;204 (no content)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PUT&lt;/td&gt;
&lt;td&gt;404&lt;/td&gt;
&lt;td&gt;Maybe&lt;/td&gt;
&lt;td&gt;Maybe&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PUT&lt;/td&gt;
&lt;td&gt;405 (method not allowed)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PATCH (update/modify)&lt;/td&gt;
&lt;td&gt;200&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PATCH&lt;/td&gt;
&lt;td&gt;204 (no content)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PATCH&lt;/td&gt;
&lt;td&gt;404&lt;/td&gt;
&lt;td&gt;Maybe&lt;/td&gt;
&lt;td&gt;Maybe&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PATCH&lt;/td&gt;
&lt;td&gt;405 (method not allowed)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DELETE (delete)&lt;/td&gt;
&lt;td&gt;200&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DELETE&lt;/td&gt;
&lt;td&gt;404&lt;/td&gt;
&lt;td&gt;Maybe&lt;/td&gt;
&lt;td&gt;Maybe&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DELETE&lt;/td&gt;
&lt;td&gt;405 (method not allowed)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Instead of this mess, I'd rather just focus my communications between browser and web server on the 200 (OK), 400 (bad request), and 404 (not found) responses. Either communications was good and I ask the app to continue processing using the data returned, or the end point was not found (404) and we handle that response as appropriate.&lt;/p&gt;

&lt;p&gt;The HTTP status codes can provide some guidance for &lt;em&gt;app return codes&lt;/em&gt; in that we may want a standardized response where&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stolen HTTP Status Code&lt;/th&gt;
&lt;th&gt;means what it means&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;201&lt;/td&gt;
&lt;td&gt;success on creation of resource&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;204&lt;/td&gt;
&lt;td&gt;there is no content to be displayed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;404&lt;/td&gt;
&lt;td&gt;bad resource id&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;405&lt;/td&gt;
&lt;td&gt;method not allowed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;409&lt;/td&gt;
&lt;td&gt;resource already exists (duplicate?)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;418&lt;/td&gt;
&lt;td&gt;in the event we ask a teapot to brew coffee&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;But, &lt;strong&gt;these are returned in an app response header, not the HTTP response.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Client Side Hassle
&lt;/h2&gt;

&lt;p&gt;This comes down to the incurred cost of developing or using a package to support AJAX communications that are formally correct but get tortured into a POST by the time the web server passes the request to server-side code. It may only become a personal preference to branch off a request header rather than a verb in the communications overhead. Either way, the detection work still needs to be done. But I feel better working off the request than the communications header.&lt;/p&gt;

&lt;h2&gt;
  
  
  Server Side Hassle
&lt;/h2&gt;

&lt;p&gt;...continuing, pulling my action detection out of the comms header and into a request header allows for separation of web server code from request code. That is, my server script end point merely has to pull the request header and body from the web server and feed it to the server-side code. Now, we could interpret the web server request and translate it for the server-side code, by why introduce that action at all ? Why not decouple altogether and simply state the action in a request header which passes untouched from the client-side to the server-side ?&lt;/p&gt;

&lt;h2&gt;
  
  
  Boundary Crossing
&lt;/h2&gt;

&lt;p&gt;Revisiting the whole use of HTTP status codes to tell me about something that happened in the server-side code (beyond the web server). Just as I dont want the server-side code using information from the comm header (GET|POST) to know what action to take (NEW|CREATE|EDIT|UPDATE|SHOW|LIST|DELETE), I don't want the client-side code to take app-related action based on information in the comm response. &lt;/p&gt;

&lt;p&gt;Why should the comm response be anything (for a web app) beyond 200, 400, 404 ? &lt;/p&gt;

&lt;p&gt;Now, in the event, the API is to be exposed for third-party usage that (historically) expects app-related responses from the comm layer, I get it. The legacy reasons for including those responses may be overwhelming.&lt;/p&gt;

&lt;p&gt;I also expect this will have mocking/testing benefits although a proper decoupling of server side code may have accomplished this anyway, yielding no incremental benefit.&lt;/p&gt;

&lt;h2&gt;
  
  
  KISS
&lt;/h2&gt;

&lt;p&gt;Standardizing the request header and request body on both the server and client sides means only dealing with a single model for creating and responding to a request. Check.&lt;/p&gt;

&lt;p&gt;Reducing the ajax communications to concerns related to GET, POST and the pass/fail nature of the communications link streamlines communications processing between client and server. Check.&lt;/p&gt;

&lt;p&gt;Implementing a response body into the &lt;em&gt;data&lt;/em&gt; portion of a response complicates the client-side processing. A bit. Ugh.&lt;/p&gt;

&lt;h2&gt;
  
  
  Server Logs
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;update 1&lt;/strong&gt;&lt;br&gt;
&lt;del&gt;Oh, and I don't expose any of our structure in server logs. When the path goes into the payload instead of the URI, the structure is hidden. That may not have been a concern a decade ago, but I am beginning to think it should be more of a concern today. Just as we played fast and loose with all of early IoT toys around the house, we may be flirting with danger allowing our resource end points to appear in server logs.&lt;/del&gt;&lt;br&gt;
&lt;strong&gt;/update 1&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Thanks
&lt;/h1&gt;

&lt;p&gt;Thanks for taking the time to read this. And even more thanks if you choose to respond/comment with constructive criticism. Kudos.&lt;/p&gt;


</description>
      <category>rest</category>
      <category>http</category>
      <category>httpverb</category>
    </item>
  </channel>
</rss>
