Class: Roar::Representer::Transport::NetHTTP

Inherits:
Object
  • Object
show all
Defined in:
lib/roar/representer/transport/net_http.rb,
lib/roar/representer/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



25
26
27
# File 'lib/roar/representer/transport/net_http.rb', line 25

def delete_uri(*options, &block)
  call(Net::HTTP::Delete, *options, &block)
end

#get_uri(*options, &block) ⇒ Object



13
14
15
# File 'lib/roar/representer/transport/net_http.rb', line 13

def get_uri(*options, &block)
  call(Net::HTTP::Get, *options, &block)
end

#patch_uri(*options, &block) ⇒ Object



29
30
31
# File 'lib/roar/representer/transport/net_http.rb', line 29

def patch_uri(*options, &block)
  call(Net::HTTP::Patch, *options, &block)
end

#post_uri(*options, &block) ⇒ Object



17
18
19
# File 'lib/roar/representer/transport/net_http.rb', line 17

def post_uri(*options, &block)
  call(Net::HTTP::Post, *options, &block)
end

#put_uri(*options, &block) ⇒ Object



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

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