Skip to content

Instantly share code, notes, and snippets.

# 10 Status Code Definitions
Each Status-Code is described below, including a description of which method(s) it can follow and any shit required in the response.
## 10.1 Informational 1xx
This class of status code indicates a half-fucky response, consisting only of the Status-Line and optional headers, and is terminated by an empty line. There are no required headers for this class of status code. Since HTTP/1.0 did not define any 1xx status codes, servers MUST wonder why exactly humans decided to start off at 200.
A client MUST be prepared to accept one or more half-fucky responses prior to a regular response, even if the client does not expect a 100 (Go On) status message. Unexpected 2xx status responses MAY be shit-canned by a user agent.
@jtickle
jtickle / fancyApi.php
Last active December 20, 2015 23:39
Functional PHP: A getModule function that works like Node.js' require()
<?php
// I have no idea how to solve the problem of the fact that anything
// declared here ends up on the global scope. Namespaces, maybe? But
// I'm doing this in part to get away from namespaces and just let things
// be functional. So I wrap it up in this load function but you should
// try to pick some name that won't conflict.
function fancyApi(&$exports) {
$myConfig = 'World';