class Acfs::Response

This represents a response. In addition to an standard HTTP it has a field ‘data` for storing the encoded body.

Attributes

body[R]
data[RW]
headers[R]
request[R]
status[R]

Public Class Methods

new(request, **opts) click to toggle source

delegate :status, :status_message, :success?, :modified?, :timed_out?,

:response_body, :response_headers, :response_code, :headers,
to: :response
# File lib/acfs/response.rb, line 22
def initialize(request, **opts)
  @request  = request
  @status   = opts[:status]  || 0
  @headers  = opts[:headers] || {}
  @body     = opts[:body]    || ''
  @data     = opts[:data]    || nil
end