class Gem::WebauthnListener::Response
Attributes
http_response[R]
Public Class Methods
for(host)
click to toggle source
# File rubygems/webauthn_listener/response.rb, line 30 def self.for(host) new(host) end
new(host)
click to toggle source
# File rubygems/webauthn_listener/response.rb, line 34 def initialize(host) @host = host build_http_response end
Public Instance Methods
to_s()
click to toggle source
# File rubygems/webauthn_listener/response.rb, line 40 def to_s status_line = "HTTP/#{@http_response.http_version} #{@http_response.code} #{@http_response.message}\r\n" headers = @http_response.to_hash.map {|header, value| "#{header}: #{value.join(", ")}\r\n" }.join + "\r\n" body = @http_response.body ? "#{@http_response.body}\n" : "" status_line + headers + body end