Skip to content

Sponsor: Do you build complex software systems? See how NServiceBus makes it easier to design, build, and manage software systems that use message queues to achieve loose coupling. Get started for free.

Learn more about Software Architecture & Design.
Join thousands of developers getting weekly updates to increase your understanding of software architecture and design concepts.


Follow @CodeOpinion

HTTP API

Free your HTTP API. Misconceptions are holding you back!

We all get caught in the trap of following various practices because everyone else is and seems like an industry standard. So here are three HTTP API Misconceptions that will make you start thinking about your system and other best practices you’re applying. YouTube Check out my YouTube channel, where I post all kinds of content accompanying my posts, including this video showing everything in this post. Custom Headers The first of the HTTP API Misconceptions is about custom headers. This is a great example of just following the herd and assuming that because everyone else does it “this way”, then that’s… Read More »Free your HTTP API. Misconceptions are holding you back!

Optimistic Concurrency in an HTTP API with ETags & Hypermedia

How do you implement optimistic concurrency in an HTTP API? There are a couple of different ways, regardless of what datastore you’re using in the backend. You can leverage the ETag header in the HTTP Response to return a “version” of the resource that was accessed. When a client then needs to perform some operation on the resource, they send an If-Match header apart of the request with the value being the result of ETag from the initial GET request. Another option is to leverage hypermedia by returning URIs for actions relevant to a resource that include the version apart… Read More »Optimistic Concurrency in an HTTP API with ETags & Hypermedia

Handling HTTP API Errors with Problem Details

If you’re developing an HTTP API, having a consistent way of returning errors can make handling errors on the client-side simpler. I’ve talked about Problem Details in another video, which is a standard for returning machine-readable details of errors in an HTTP Response. In this video, I’ll cover how to consume those HTTP API Errors from the client-side. YouTube Check out my YouTube channel where I post all kinds of content that accompanies my posts including this video showing everything that is in this post. Problem Details If you’re unfamiliar, Problem Details (https://tools.ietf.org/html/rfc7807) is a standard for providing errors from your HTTP… Read More »Handling HTTP API Errors with Problem Details