class TingYun::Http::HttpClientRequest
Attributes
header[R]
method[R]
Public Class Methods
new(proxy, *args, &block)
click to toggle source
# File lib/ting_yun/http/http_client_request.rb, line 7 def initialize(proxy, *args, &block) @method, @uri, @query, @body, @header = args @proxy = proxy @block = block end
Public Instance Methods
[](key)
click to toggle source
# File lib/ting_yun/http/http_client_request.rb, line 28 def [](key) @header[key] end
[]=(key, value)
click to toggle source
# File lib/ting_yun/http/http_client_request.rb, line 32 def []=(key, value) @header[key] = value end
args()
click to toggle source
# File lib/ting_yun/http/http_client_request.rb, line 45 def args return @method, @uri, @query, @body, @header end
from()
click to toggle source
# File lib/ting_yun/http/http_client_request.rb, line 17 def from "HttpClient" end
host()
click to toggle source
# File lib/ting_yun/http/http_client_request.rb, line 21 def host @uri.host || @proxy.host end
path()
click to toggle source
# File lib/ting_yun/http/http_client_request.rb, line 41 def path @uri end
port()
click to toggle source
# File lib/ting_yun/http/http_client_request.rb, line 24 def port @uri.port || @uri.port end
type()
click to toggle source
# File lib/ting_yun/http/http_client_request.rb, line 13 def type @uri.scheme end
uri()
click to toggle source
# File lib/ting_yun/http/http_client_request.rb, line 36 def uri return @uri if @uri.scheme && @uri.host && @uri.port URI("#{@proxy.scheme.downcase}://#{@proxy.host}:#{@proxy.port}#{@uri}") end