Class: Rack::StreamingProxy::Request
- Inherits:
-
Object
- Object
- Rack::StreamingProxy::Request
- Defined in:
- lib/rack/streaming_proxy/request.rb
Instance Attribute Summary collapse
-
#http_request ⇒ Object
readonly
Returns the value of attribute http_request.
Instance Method Summary collapse
- #host ⇒ Object
-
#initialize(destination_uri, current_request) ⇒ Request
constructor
A new instance of Request.
- #port ⇒ Object
- #uri ⇒ Object
- #use_ssl? ⇒ Boolean
Constructor Details
#initialize(destination_uri, current_request) ⇒ Request
Returns a new instance of Request.
8 9 10 11 |
# File 'lib/rack/streaming_proxy/request.rb', line 8 def initialize(destination_uri, current_request) @destination_uri = URI.parse(destination_uri) @http_request = translate_request(current_request, @destination_uri) end |
Instance Attribute Details
#http_request ⇒ Object (readonly)
Returns the value of attribute http_request.
6 7 8 |
# File 'lib/rack/streaming_proxy/request.rb', line 6 def http_request @http_request end |
Instance Method Details
#host ⇒ Object
13 14 15 |
# File 'lib/rack/streaming_proxy/request.rb', line 13 def host @destination_uri.host end |
#port ⇒ Object
17 18 19 |
# File 'lib/rack/streaming_proxy/request.rb', line 17 def port @destination_uri.port end |
#uri ⇒ Object
25 26 27 |
# File 'lib/rack/streaming_proxy/request.rb', line 25 def uri @destination_uri.to_s end |
#use_ssl? ⇒ Boolean
21 22 23 |
# File 'lib/rack/streaming_proxy/request.rb', line 21 def use_ssl? @destination_uri.is_a? URI::HTTPS end |