by kelseyfrog · 4y ago · 0 comments
Having worked in an organization where people were very familiar with the academic definition of REST, the biggest benefit of being a backend developer was that when client-side folks depended on nonRESTful behavior, we had some authority to back that claim. It gave us leeway in making some optimizations we couldn't have made otherwise, and we got to stick to RFCs to resolve many disputes rather than use organizational power to force someone to break compliance to standards. I suppose it meant that we were often free to bikeshed other aspects of design instead.
Edit: See how this post has zoomed to hundreds of comments in just minutes by people arguing the 'one true REST'. The situation is insufferable.
bookHotelUri = listHotelResponse.data.urls[4];
Or listHotelResponse .data.urls.find(u=>u.action===‘book’).url
? listHotelResponse.data.urls.find(u=>u.rel===‘booking’).url
Web linking is defined in https://www.rfc-editor.org/rfc/rfc8288.html and that's the basis for using rel as well as a host of other attributes.