Sha256: 4e18c0c2cedb4bfed9f2572ad7ae279f0e33610ceb22d77fdeb3cf5043649e29
Contents?: true
Size: 541 Bytes
Versions: 18
Compression:
Stored size: 541 Bytes
Contents
module ProconBypassMan::ProconDisplay class HttpResponse def initialize(body, status: , format: "text/json") @body = body&.to_json @status = status @format = format end def to_s <<~EOH HTTP/1.1 #{@status} Content-Length: #{@body&.bytes&.size || 0} Content-Type: #{@format} Access-Control-Allow-Origin: * Access-Control-Allow-Methods: GET Access-Control-Allow-Private-Network:true Connection: close #{@body} EOH end end end
Version data entries
18 entries across 18 versions & 1 rubygems