Sha256: 749bb78a8ee70be510e78f53f038529b3ffd016b07dcdbdc96647171dafe79c1

Contents?: true

Size: 745 Bytes

Versions: 55

Compression:

Stored size: 745 Bytes

Contents

# typed: strict
# frozen_string_literal: true

module PlugApp
  module HTTP
    extend T::Sig

    OK = "OK"
    OK_I = 200

    CREATED = "Created"
    CREATED_I = 201
    NO_CONTENT = "No Content"
    NO_CONTENT_I = 204

    FOUND = "Found"
    FOUND_I = 302

    NOT_FOUND = "Not Found"
    NOT_FOUND_I = 404
    BAD_REQUEST = "Bad Request"
    BAD_REQUEST_I = 400
    UNAUTHORIZED = "Unauthorized"
    UNAUTHORIZED_I = 401
    FORBIDDEN = "Forbidden"
    FORBIDDEN_I = 403
    NOT_ACCEPTABLE = "Not Acceptable"
    NOT_ACCEPTABLE_I = 406
    SERVICE_UNAVAILABLE = "Service Unavailable"
    SERVICE_UNAVAILABLE_I = 503

    sig { params(status: Integer).returns(T::Boolean) }
    def status_ok?(status)
      status == OK_I
    end
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
hephaestus-0.8.11 templates/app/lib/plug_app/http.rb
hephaestus-0.8.10 templates/app/lib/plug_app/http.rb
hephaestus-0.8.9.2 templates/app/lib/plug_app/http.rb
hephaestus-0.8.9.1 templates/app/lib/plug_app/http.rb
hephaestus-0.8.9 templates/app/lib/plug_app/http.rb
hephaestus-0.8.8 templates/app/lib/plug_app/http.rb
hephaestus-0.8.7.5 templates/app/lib/plug_app/http.rb
hephaestus-0.8.7.4 templates/app/lib/plug_app/http.rb
hephaestus-0.8.7.3 templates/app/lib/plug_app/http.rb
hephaestus-0.8.7.2 templates/app/lib/plug_app/http.rb
hephaestus-0.8.7.1 templates/app/lib/plug_app/http.rb
hephaestus-0.8.7 templates/app/lib/plug_app/http.rb
hephaestus-0.8.6 templates/app/lib/plug_app/http.rb
hephaestus-0.8.5 templates/app/lib/plug_app/http.rb
hephaestus-0.8.4.1 templates/app/lib/plug_app/http.rb
hephaestus-0.8.4 templates/app/lib/plug_app/http.rb
hephaestus-0.8.3.4 templates/app/lib/plug_app/http.rb
hephaestus-0.8.3.3 templates/app/lib/plug_app/http.rb
hephaestus-0.8.3.2 templates/app/lib/plug_app/http.rb
hephaestus-0.8.3.1 templates/app/lib/plug_app/http.rb