class Roar::Transport::NetHTTP
Low-level interface for HTTP. The get_uri
and friends accept an options and an optional block, invoke the HTTP request and return the request object.
The following options are available:
Public Instance Methods
delete_uri(*options, &block)
click to toggle source
# File lib/roar/transport/net_http.rb, line 24 def delete_uri(*options, &block) call(Net::HTTP::Delete, *options, &block) end
get_uri(*options, &block)
click to toggle source
# File lib/roar/transport/net_http.rb, line 12 def get_uri(*options, &block) call(Net::HTTP::Get, *options, &block) end
patch_uri(*options, &block)
click to toggle source
# File lib/roar/transport/net_http.rb, line 28 def patch_uri(*options, &block) call(Net::HTTP::Patch, *options, &block) end
post_uri(*options, &block)
click to toggle source
# File lib/roar/transport/net_http.rb, line 16 def post_uri(*options, &block) call(Net::HTTP::Post, *options, &block) end
put_uri(*options, &block)
click to toggle source
# File lib/roar/transport/net_http.rb, line 20 def put_uri(*options, &block) call(Net::HTTP::Put, *options, &block) end
Private Instance Methods
call(what, options, &block)
click to toggle source
# File lib/roar/transport/net_http.rb, line 33 def call(what, options, &block) # TODO: generically handle return codes. Request.new(options).call(what, &block) end