Module: HTTP::Chainable::Verbs
- Included in:
- HTTP::Chainable
- Defined in:
- lib/http/chainable/verbs.rb
Overview
HTTP verb shortcut methods
Each method delegates to #request with the appropriate verb.
Instance Method Summary collapse
-
#connect(uri) {|response| ... } ⇒ HTTP::Response, Object
Convert to a transparent TCP/IP tunnel.
-
#delete(uri) {|response| ... } ⇒ HTTP::Response, Object
Delete a resource.
-
#get(uri) {|response| ... } ⇒ HTTP::Response, Object
Get a resource.
-
#head(uri) {|response| ... } ⇒ HTTP::Response, Object
Request a get sans response body.
-
#options(uri) {|response| ... } ⇒ HTTP::Response, Object
Return the methods supported on the given URI.
-
#patch(uri) {|response| ... } ⇒ HTTP::Response, Object
Apply partial modifications to a resource.
-
#post(uri) {|response| ... } ⇒ HTTP::Response, Object
Post to a resource.
-
#put(uri) {|response| ... } ⇒ HTTP::Response, Object
Put to a resource.
-
#trace(uri) {|response| ... } ⇒ HTTP::Response, Object
Echo the request back to the client.
Instance Method Details
#connect(uri) {|response| ... } ⇒ HTTP::Response, Object
Convert to a transparent TCP/IP tunnel
117 118 119 |
# File 'lib/http/chainable/verbs.rb', line 117 def connect(uri, **, &) request(:connect, uri, **, &) # steep:ignore end |
#delete(uri) {|response| ... } ⇒ HTTP::Response, Object
Delete a resource
75 76 77 |
# File 'lib/http/chainable/verbs.rb', line 75 def delete(uri, **, &) request(:delete, uri, **, &) # steep:ignore end |
#get(uri) {|response| ... } ⇒ HTTP::Response, Object
Get a resource
33 34 35 |
# File 'lib/http/chainable/verbs.rb', line 33 def get(uri, **, &) request(:get, uri, **, &) # steep:ignore end |
#head(uri) {|response| ... } ⇒ HTTP::Response, Object
Request a get sans response body
19 20 21 |
# File 'lib/http/chainable/verbs.rb', line 19 def head(uri, **, &) request(:head, uri, **, &) # steep:ignore end |
#options(uri) {|response| ... } ⇒ HTTP::Response, Object
Return the methods supported on the given URI
103 104 105 |
# File 'lib/http/chainable/verbs.rb', line 103 def (uri, **, &) request(:options, uri, **, &) # steep:ignore end |
#patch(uri) {|response| ... } ⇒ HTTP::Response, Object
Apply partial modifications to a resource
131 132 133 |
# File 'lib/http/chainable/verbs.rb', line 131 def patch(uri, **, &) request(:patch, uri, **, &) # steep:ignore end |
#post(uri) {|response| ... } ⇒ HTTP::Response, Object
Post to a resource
47 48 49 |
# File 'lib/http/chainable/verbs.rb', line 47 def post(uri, **, &) request(:post, uri, **, &) # steep:ignore end |
#put(uri) {|response| ... } ⇒ HTTP::Response, Object
Put to a resource
61 62 63 |
# File 'lib/http/chainable/verbs.rb', line 61 def put(uri, **, &) request(:put, uri, **, &) # steep:ignore end |
#trace(uri) {|response| ... } ⇒ HTTP::Response, Object
Echo the request back to the client
89 90 91 |
# File 'lib/http/chainable/verbs.rb', line 89 def trace(uri, **, &) request(:trace, uri, **, &) # steep:ignore end |