PHPNews

301 Moved Permanently

301 Moved Permanently tells a client that the resource they’re trying to access has moved to a new location. The server will include the new location in the Location header. When a client sees this response, it should repeat the same request on the new location, and if it can, it should also update any links it …

Continue reading »

Written by Evert Pot - - Aggregated on Tuesday September 18, 2018


300 Multiple Choices

300 Multiple Choices is the first of the 3xx series, which are all used for redirection. 300 should be emitted specifically when a resource can redirect to more than one location, and it wants the user to decide which one. Support for 300 is scarce. In the past both the URI and Alternates HTTP …

Continue reading »

Written by Evert Pot - - Aggregated on Tuesday September 11, 2018


Curveball - a TypeScript micro-framework

I’ve been doing Node.js development for a little while, and I wanted to try my hand at writing a framework. It’s probably a rite of passage to do this, although it’s not really my first. By releasing it today, I want to see if this is worth investing time in in the future, or if I should focus my energy elsewhere. …

Continue reading »

Written by Evert Pot - - Aggregated on Thursday September 6, 2018


226 IM Used

226 IM Used is used by a specific extension of the HTTP protocol. The extension allows a HTTP server to send diffs (changes) of resources to clients. For example, a client (like a browser) might have a cache for a certain resource. It also has an ETag stored. When a client wants to see if there’s an update, it …

Continue reading »

Written by Evert Pot - - Aggregated on Tuesday September 4, 2018


HTTP/2 Push for APIs

HTTP/2 brought us the ability to push resources from server to client, before client knows they need it. HTTP/2 push has had mixed success, up to a point where Chrome developers are thinking of experimenting with disabling it alltogether . I think this would be a huge loss for APIs, so I shared my thoughts on the …

Continue reading »

Written by Evert Pot - - Aggregated on Saturday September 1, 2018


Use 'let' and 'const' instead of 'var'

If you are writing javascript code for Node.js, Babel, Typescript or if you can target up-to-date browsers , chances are that your environment supports the let and const keywords. If this is the case, you should stop using var and use let and const exclusively. Here’s why: var uses something …

Continue reading »

Written by Evert Pot - - Aggregated on Wednesday August 29, 2018


208 Already Reported

208 Already Reported is, like 207 Multi-Status a HTTP status code specific to WebDAV. It’s even more obscure, because it’s defined in a rarely used extension of WebDAV . The extension adds ‘Binding’ extensions to WebDAV. WebDAV is a bit like a filesystem over HTTP, and the Binding extensions add support for a …

Continue reading »

Written by Evert Pot - - Aggregated on Tuesday August 28, 2018


Building protocols with HTTP

Mark Nottingham is working on a great guide titled “Building Protocols with HTTP”. Regardless of if you are doing pure REST or some variant, this guide has an absolute wealth of information that everyone should read at least once before building something on top of HTTP. It’s matter-of-fact, concise and …

Continue reading »

Written by Evert Pot - - Aggregated on Wednesday August 22, 2018


207 Multi-Status

207 Multi-Status is used primarily by WebDAV servers. I don’t think it’s used much outside of WebDAV, if at all. The WebDAV specification describes this statuscode as an indicator to a client that multiple operations happened, and that the status for each operation can be found in the body of the response. …

Continue reading »

Written by Evert Pot - - Aggregated on Tuesday August 21, 2018


206 Partial Content

206 Partial Content is used for range requests. It’s possible for a HTTP client to request only portions of a resource using range requests. Examples of this might include a large log resource for which a client only wants the last n bytes. Or maybe a video and the client doesn’t want to buffer more data than …

Continue reading »

Written by Evert Pot - - Aggregated on Tuesday August 14, 2018


205 Reset Content

205 Reset Content is somewhat similar to 204 No Content . It’s especially meant for hypertext applications. Imagine if a user is filling in a HTML form, and this form gets submitted to the server. If the server sends back a 204 , a browser could act on this by telling the user the form submission was …

Continue reading »

Written by Evert Pot - - Aggregated on Tuesday August 7, 2018


Firefox removes RSS support

gHacks recently reported that Mozilla plans to remove support for RSS & Atom related features. Specifically Live Bookmarks and their feed reader. The reasons cited are the lack of usage. This doesn’t completely surprise me. Both of the features don’t fit that well with modern workflows. There’s not a lot of …

Continue reading »

Written by Evert Pot - - Aggregated on Friday August 3, 2018


204 No Content

204 No Content should be returned by a server when a request was successful, but there was no response body. For most APIs, the following two responses are the same: HTTP/1.1 200 OK Content-Length: 0 HTTP/1.1 204 No Content The second format has a slight preference by most API designers. The …

Continue reading »

Written by Evert Pot - - Aggregated on Tuesday July 31, 2018


203 Non-Authoritative Information

203 Non-Authoritative Information is a status-code that might be used by a HTTP proxy. A HTTP Proxy sits in the middle between a client and a server (origin). In some cases a HTTP Proxy might make changes to the response before it reaches the client. Perhaps because the Proxy converts the format, or maybe it …

Continue reading »

Written by Evert Pot - - Aggregated on Tuesday July 24, 2018


202 Accepted

202 Accepted , means that the server accepted the request, but it’s not sure yet if the request will be completed successfully. The specification calls it ‘intentionally non-committal’. You might see APIs using this response for for example asynchronous batch processing. HTTP doesn’t have a standard way to …

Continue reading »

Written by Evert Pot - - Aggregated on Tuesday July 17, 2018


Bye Disqus, hello Webmention!

Since 2013 I’ve used Disqus on this website for comments. Over the years Disqus has been getting ‘fatter’, so I’ve been thinking of switching to something new. Then on Friday, I saw a tweet which got me inspired: I moved to distributed, standard based, and @indiewebcamp solutions based comments, AKA …

Continue reading »

Written by Evert Pot - - Aggregated on Monday July 16, 2018


201 Created

201 Created , just like 200 OK , means that the request was successful, but it also resulted in a new resource being created. In the case of a PUT request, it means that a new resource was created on the actual url that was specified in the request. Example PUT /new-resource HTTP/1.1 Content-Type: …

Continue reading »

Written by Evert Pot - - Aggregated on Tuesday July 10, 2018


200 OK

200 OK is the most common HTTP status code. It generally means that the HTTP request succeeded. If the HTTP request was a GET request, the response should include the full representation of the resource. If the response has no body, then the 204 No Content response body should be used instead. Example: …

Continue reading »

Written by Evert Pot - - Aggregated on Tuesday July 3, 2018


103 Early Hints

103 Early Hints is an experimental status code. It can be used by a server to preemptively send headers to a client or intermediary. A client might be able to use these headers to make certain optimizations as early as possible in the process. The specific use-case in RFC8297 is preloading. A server might tell …

Continue reading »

Written by Evert Pot - - Aggregated on Saturday June 30, 2018


102 Processing

102 Processing is a pretty rare status code. It’s not in the official newer HTTP specifications , and its only appearance is in an obsolete version of the WebDAV specification. It was left out of the current WebDAV specification, and more recent HTTP specifications . When the server sends back the 102 …

Continue reading »

Written by Evert Pot - - Aggregated on Friday June 29, 2018