Class: Elevate::HTTP::HTTPResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/elevate/http/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHTTPResponse



4
5
6
7
8
9
# File 'lib/elevate/http/response.rb', line 4

def initialize
  @body = nil
  @headers = nil
  @status_code = nil
  @error = nil
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



16
17
18
# File 'lib/elevate/http/response.rb', line 16

def body
  @body
end

#errorObject

Returns the value of attribute error.



19
20
21
# File 'lib/elevate/http/response.rb', line 19

def error
  @error
end

#headersObject

Returns the value of attribute headers.



17
18
19
# File 'lib/elevate/http/response.rb', line 17

def headers
  @headers
end

#status_codeObject

Returns the value of attribute status_code.



18
19
20
# File 'lib/elevate/http/response.rb', line 18

def status_code
  @status_code
end

Instance Method Details

#append_data(data) ⇒ Object



11
12
13
14
# File 'lib/elevate/http/response.rb', line 11

def append_data(data)
  @body ||= NSMutableData.alloc.init
  @body.appendData(data)
end