class TingYun::Http::CurbRequest
Constants
- CURB
- LHOST
- UHOST
Public Class Methods
new( curlobj )
click to toggle source
# File lib/ting_yun/http/curb_wrappers.rb, line 13 def initialize( curlobj ) @curlobj = curlobj end
Public Instance Methods
[]( key )
click to toggle source
# File lib/ting_yun/http/curb_wrappers.rb, line 37 def []( key ) @curlobj.headers[ key ] end
[]=( key, value )
click to toggle source
# File lib/ting_yun/http/curb_wrappers.rb, line 41 def []=( key, value ) @curlobj.headers[ key ] = value end
from()
click to toggle source
# File lib/ting_yun/http/curb_wrappers.rb, line 21 def from "curb http" end
host()
click to toggle source
# File lib/ting_yun/http/curb_wrappers.rb, line 29 def host host_from_header || self.uri.host end
host_from_header()
click to toggle source
# File lib/ting_yun/http/curb_wrappers.rb, line 25 def host_from_header self[LHOST] || self[UHOST] end
method()
click to toggle source
# File lib/ting_yun/http/curb_wrappers.rb, line 33 def method @curlobj._ty_http_verb end
type()
click to toggle source
# File lib/ting_yun/http/curb_wrappers.rb, line 17 def type CURB end
uri()
click to toggle source
# File lib/ting_yun/http/curb_wrappers.rb, line 45 def uri @uri ||= TingYun::Agent::HTTPClients::URIUtil.parse_and_normalize_url(@curlobj.url) end