Class: Roar::Transport::NetHTTP

Inherits:
Object
  • Object
show all
Defined in:
lib/roar/transport/net_http.rb,
lib/roar/transport/net_http/request.rb

Overview

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:

Defined Under Namespace

Classes: Request

Instance Method Summary collapse

Instance Method Details

#delete_uri(*options, &block) ⇒ Object


24
25
26
# 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) ⇒ Object


12
13
14
# 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) ⇒ Object


28
29
30
# 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) ⇒ Object


16
17
18
# 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) ⇒ Object


20
21
22
# File 'lib/roar/transport/net_http.rb', line 20

def put_uri(*options, &block)
  call(Net::HTTP::Put, *options, &block)
end