Class: HttpStub::Server::Response
- Inherits:
-
Object
- Object
- HttpStub::Server::Response
- Defined in:
- lib/http_stub/server/response.rb
Constant Summary collapse
- OK =
ok.freeze
- NOT_FOUND =
HttpStub::Server::Stub::Response::Text.new("status" => 404, "body" => "NOT FOUND").freeze
- EMPTY =
HttpStub::Server::Stub::Response::Text.new.freeze
Class Method Summary collapse
Class Method Details
.ok(opts = {}) ⇒ Object
6 7 8 9 10 |
# File 'lib/http_stub/server/response.rb', line 6 def self.ok(opts={}) HttpStub::Server::Stub::Response::Text.new( { "headers" => {}, "body" => "OK" }.merge(opts).merge("status" => 200) ) end |