Module: Pigeon::Http

Defined in:
lib/pigeon/http.rb

Defined Under Namespace

Classes: Error, Request, Response

Constant Summary collapse

GET =
Net::HTTP::Get
HEAD =
Net::HTTP::Head
PUT =
Net::HTTP::Put
POST =
Net::HTTP::Post
DELETE =
Net::HTTP::Delete
OPTIONS =
Net::HTTP::Options
TRACE =
Net::HTTP::Trace
SSL_VERIFY_NONE =
OpenSSL::SSL::VERIFY_NONE
SSL_VERIFY_PEER =
OpenSSL::SSL::VERIFY_PEER

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.open_timeoutObject

Returns the value of attribute open_timeout.



16
17
18
# File 'lib/pigeon/http.rb', line 16

def open_timeout
  @open_timeout
end

.read_timeoutObject

Returns the value of attribute read_timeout.



16
17
18
# File 'lib/pigeon/http.rb', line 16

def read_timeout
  @read_timeout
end

.so_lingerObject

Returns the value of attribute so_linger.



16
17
18
# File 'lib/pigeon/http.rb', line 16

def so_linger
  @so_linger
end

.ssl_timeoutObject

Returns the value of attribute ssl_timeout.



16
17
18
# File 'lib/pigeon/http.rb', line 16

def ssl_timeout
  @ssl_timeout
end

Class Method Details

.delete(uri, args = {}) ⇒ Object



207
208
209
# File 'lib/pigeon/http.rb', line 207

def delete uri, args = {}
  Request.new(DELETE, uri, args).execute
end

.get(uri, args = {}) ⇒ Object



195
196
197
# File 'lib/pigeon/http.rb', line 195

def get uri, args = {}
  Request.new(GET, uri, args).execute
end

.options(uri, args = {}) ⇒ Object



211
212
213
# File 'lib/pigeon/http.rb', line 211

def options uri, args = {}
  Request.new(OPTIONS, uri, args).execute
end

.post(uri, args = {}) ⇒ Object



203
204
205
# File 'lib/pigeon/http.rb', line 203

def post uri, args = {}
  Request.new(POST, uri, args).execute
end

.put(uri, args = {}) ⇒ Object



199
200
201
# File 'lib/pigeon/http.rb', line 199

def put uri, args = {}
  Request.new(PUT, uri, args).execute
end

.trace(uri, args = {}) ⇒ Object



215
216
217
# File 'lib/pigeon/http.rb', line 215

def trace uri, args = {}
  Request.new(TRACE, uri, args).execute
end