Skip to content

Instantly share code, notes, and snippets.

@matthewstokeley
Created December 19, 2019 00:17
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save matthewstokeley/37b268ac6b9386d38e34e4e18d43536a to your computer and use it in GitHub Desktop.
// from the Node.js source
if (methodIsString && method) {
if (!checkIsHttpToken(method)) {
throw new ERR_INVALID_HTTP_TOKEN('Method', method);
}
method = this.method = method.toUpperCase();
} else {
method = this.method = 'GET';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment