~jomco/clj-http-status-codes

2abccfe2009b1df375b0a33ed96e8cfd534b461d — R.W. van 't Veer 1 year, 4 months ago master
Initial
4 files changed, 134 insertions(+), 0 deletions(-)

A LICENSE
A README.md
A project.clj
A src/nl/jomco/http_status_codes.cljc
A  => LICENSE +21 -0
@@ 1,21 @@
Copyright 2022 Remco van 't Veer
Copyright 2022 Jomco B.V.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

A  => README.md +34 -0
@@ 1,34 @@
# HTTP status codes

Source: [Internet Assigned Numbers Authority](https://www.iana.org/assignments/http-status-codes/http-status-codes.txt)

[![Clojars Project](https://img.shields.io/clojars/v/nl.jomco/clj-http-status-codes.svg)](https://clojars.org/nl.jomco/clj-http-status-codes)

## Documentation

API documentation is available inline and at [cljdoc](https://cljdoc.org/d/nl.jomco/clj-http-status-codes/CURRENT). [![](https://cljdoc.org/badge/nl.jomco/clj-http-status-codes)](https://cljdoc.org/jump/release/nl.jomco/clj-http-status-codes)

## License

Copyright 2022 Remco van 't Veer

Copyright 2022 Jomco B.V.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

A  => project.clj +8 -0
@@ 1,8 @@
(defproject nl.jomco/clj-http-status-codes "0.1"
  :description "HTTP status code constants with meaningful names"
  :url "https://git.sr.ht/~jomco/clj-http-status-codes"
  :license {:name         "MIT"
            :url          "https://opensource.org/licenses/MIT"
            :distribution :repo}
  :scm {:name "git"
        :url  "https://git.sr.ht/~jomco/proof-specs"})

A  => src/nl/jomco/http_status_codes.cljc +71 -0
@@ 1,71 @@
(ns nl.jomco.http-status-codes)

;; source: https://www.iana.org/assignments/http-status-codes/http-status-codes.txt

(def continue 100)
(def switching-protocols 101)
(def processing 102)
(def early-hints 103)
(def ok 200)
(def created 201)
(def accepted 202)
(def non-authoritative-information 203)
(def no-content 204)
(def reset-content 205)
(def partial-content 206)
(def multi-status 207)
(def already-reported 208)
(def im-used 226)
(def multiple-choices 300)
(def moved-permanently 301)
(def found 302)
(def see-other 303)
(def not-modified 304)
(def use-proxy 305)
(def temporary-redirect 307)
(def permanent-redirect 308)
(def bad-request 400)
(def unauthorized 401)
(def payment-required 402)
(def forbidden 403)
(def not-found 404)
(def method-not-allowed 405)
(def not-acceptable 406)
(def proxy-authentication-required 407)
(def request-timeout 408)
(def conflict 409)
(def gone 410)
(def length-required 411)
(def precondition-failed 412)
(def content-too-large 413)
(def uri-too-long 414)
(def unsupported-media-type 415)
(def range-not-satisfiable 416)
(def expectation-failed 417)
(def misdirected-request 421)
(def unprocessable-content 422)
(def locked 423)
(def failed-dependency 424)
(def too-early 425)
(def upgrade-required 426)
(def precondition-required 428)
(def too-many-requests 429)
(def request-header-fields-too-large 431)
(def unavailable-for-legal-reasons 451)
(def internal-server-error 500)
(def not-implemented 501)
(def bad-gateway 502)
(def service-unavailable 503)
(def gateway-timeout 504)
(def http-version-not-supported 505)
(def variant-also-negotiates 506)
(def insufficient-storage 507)
(def loop-detected 508)
(def not-extended 510)
(def network-authentication-required 511)

(def informational-status? (set (range 100 200)))
(def success-status? (set (range 200 300)))
(def redirection-status? (set (range 300 400)))
(def client-error-status? (set (range 400 500)))
(def server-error-status? (set (range 500 600)))