Module: HTTP::Session::Requestable
- Included in:
- HTTP::Session
- Defined in:
- lib/http/session/requestable.rb
Overview
Provides the same request API interfaces as HTTP::Client.
Mostly borrowed from http/lib/http/chainable.rb
Instance Method Summary collapse
-
#connect(uri, options = {}) ⇒ Response
Convert to a transparent TCP/IP tunnel.
-
#delete(uri, options = {}) ⇒ Response
Delete a resource.
-
#get(uri, options = {}) ⇒ Response
Get a resource.
-
#head(uri, options = {}) ⇒ Response
Request a get sans response body.
-
#options(uri, options = {}) ⇒ Response
Return the methods supported on the given URI.
-
#patch(uri, options = {}) ⇒ Response
Apply partial modifications to a resource.
-
#post(uri, options = {}) ⇒ Response
Post to a resource.
-
#put(uri, options = {}) ⇒ Response
Put to a resource.
-
#trace(uri, options = {}) ⇒ Response
Echo the request back to the client.
Instance Method Details
#connect(uri, options = {}) ⇒ Response
Convert to a transparent TCP/IP tunnel.
74 75 76 |
# File 'lib/http/session/requestable.rb', line 74 def connect(uri, = {}) request :connect, uri, end |
#delete(uri, options = {}) ⇒ Response
Delete a resource.
47 48 49 |
# File 'lib/http/session/requestable.rb', line 47 def delete(uri, = {}) request :delete, uri, end |
#get(uri, options = {}) ⇒ Response
Get a resource.
20 21 22 |
# File 'lib/http/session/requestable.rb', line 20 def get(uri, = {}) request :get, uri, end |
#head(uri, options = {}) ⇒ Response
Request a get sans response body.
11 12 13 |
# File 'lib/http/session/requestable.rb', line 11 def head(uri, = {}) request :head, uri, end |
#options(uri, options = {}) ⇒ Response
Return the methods supported on the given URI.
65 66 67 |
# File 'lib/http/session/requestable.rb', line 65 def (uri, = {}) request :options, uri, end |
#patch(uri, options = {}) ⇒ Response
Apply partial modifications to a resource.
83 84 85 |
# File 'lib/http/session/requestable.rb', line 83 def patch(uri, = {}) request :patch, uri, end |
#post(uri, options = {}) ⇒ Response
Post to a resource.
29 30 31 |
# File 'lib/http/session/requestable.rb', line 29 def post(uri, = {}) request :post, uri, end |
#put(uri, options = {}) ⇒ Response
Put to a resource.
38 39 40 |
# File 'lib/http/session/requestable.rb', line 38 def put(uri, = {}) request :put, uri, end |
#trace(uri, options = {}) ⇒ Response
Echo the request back to the client.
56 57 58 |
# File 'lib/http/session/requestable.rb', line 56 def trace(uri, = {}) request :trace, uri, end |