SixArm.com » Ruby » HTTP Status Codes
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.codeclimate/badges
.yardoc
bin
doc
lib
test
.codeclimate.yml
.document
.gemtest
.gitattributes
.gitignore
.rspec
.travis.yml
CHANGES.md
CONTRIBUTING.md
Gemfile
LICENSE.md
README.md
Rakefile
VERSION
sixarm_ruby_http_status_codes-1.1.2-sha512.txt
sixarm_ruby_http_status_codes-1.1.2.gem
sixarm_ruby_http_status_codes.gemspec

README.md

SixArm.com → Ruby →
HTTP Status Codes

Gem Version Build Status Code Climate Maintainability Coverage Status

Introduction

HTTP status codes as nicknames.

Examples:

Net::HTTP::Status::OK  #=> 200
Net::HTTP::Status::NOT_FOUND  #=> 404

For docs go to http://sixarm.com/sixarm_ruby_http_status_codes/doc

Want to help? We're happy to get pull requests.

Install

Gem

Run this command in your shell or terminal:

gem install sixarm_ruby_http_status_codes

Or add this to your Gemfile:

gem 'sixarm_ruby_http_status_codes'

Require

To require the gem in your code:

require 'sixarm_ruby_http_status_codes'

Why?

Why use these instead of just using a number? Because we prefer using nicknames that are easy.

Why use these instead of the codes that already exist in other libraries, like Ruby Net::HTTP, Rack Utils, and Rails ActionPack? Because we want WebDAV codes (e.g. 403 means a resource is locked) and informal convention codes (e.g. 599 means a network connect timeout).

See Also

To see similar codes:

  • Ruby Net HTTP library
  • Rack Utils
  • Rails ActionPack