Class: UU::OS::HTTP::HTTPResponse
- Inherits:
-
Object
- Object
- UU::OS::HTTP::HTTPResponse
- Defined in:
- uu_os_connection-2.2.4/lib/uu/os/http/http_response.rb
Overview
HTTP response.
Instance Method Summary (collapse)
-
- (String, IO) body
Returns response body.
-
- (UU::OS::HTTP::HTTPHeaders) headers
Returns response headers.
-
- (UU::OS::HTTP::HTTPRequest) request
Returns request which resulted in this response.
-
- (Fixnum) status
Returns response HTTP status code.
Instance Method Details
- (String, IO) body
Returns response body. In case of asynchronous request calling of this method causes wait for request finish.
37 38 39 40 |
# File 'uu_os_connection-2.2.4/lib/uu/os/http/http_response.rb', line 37 def body process_response return @response.body end |
- (UU::OS::HTTP::HTTPHeaders) headers
Returns response headers. In case of asynchronous request calling of this method causes wait for request finish.
29 30 31 32 |
# File 'uu_os_connection-2.2.4/lib/uu/os/http/http_response.rb', line 29 def headers process_response return @headers end |
- (UU::OS::HTTP::HTTPRequest) request
Returns request which resulted in this response. In case of asynchronous
request calling of this method causes wait for request finish, so that is
not possible to modify request before it is processed. Note that if request
body is IO it will be returned in consumed state and in case it does not
support rewind
operation there is no way to obtain original
request data.
50 51 52 53 |
# File 'uu_os_connection-2.2.4/lib/uu/os/http/http_response.rb', line 50 def request process_response return @request end |
- (Fixnum) status
Returns response HTTP status code. In case of asynchronous request calling of this method causes wait for request finish.
21 22 23 24 |
# File 'uu_os_connection-2.2.4/lib/uu/os/http/http_response.rb', line 21 def status process_response return @response.status end |