Class: Aws::Sigv4::Request
- Inherits:
-
Object
- Object
- Aws::Sigv4::Request
- Defined in:
- lib/aws-sigv4/request.rb
Instance Method Summary collapse
- #body ⇒ String, IO
- #body=(body) ⇒ Object
- #endpoint ⇒ HTTP::URI, HTTPS::URI
- #endpoint=(endpoint) ⇒ Object
- #headers ⇒ Hash<String,String>
- #headers=(headers) ⇒ Object
-
#http_method ⇒ String
One of ‘GET’, ‘PUT’, ‘POST’, ‘DELETE’, ‘HEAD’, or ‘PATCH’.
- #http_method=(http_method) ⇒ Object
-
#initialize(options = {}) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(options = {}) ⇒ Request
Returns a new instance of Request.
11 12 13 14 15 16 17 18 19 |
# File 'lib/aws-sigv4/request.rb', line 11 def initialize( = {}) @http_method = nil @endpoint = nil @headers = {} @body = '' .each_pair do |attr_name, attr_value| send("#{attr_name}=", attr_value) end end |
Instance Method Details
#body ⇒ String, IO
57 58 59 |
# File 'lib/aws-sigv4/request.rb', line 57 def body @body end |
#body=(body) ⇒ Object
52 53 54 |
# File 'lib/aws-sigv4/request.rb', line 52 def body=(body) @body = body end |
#endpoint ⇒ HTTP::URI, HTTPS::URI
37 38 39 |
# File 'lib/aws-sigv4/request.rb', line 37 def endpoint @endpoint end |
#endpoint=(endpoint) ⇒ Object
32 33 34 |
# File 'lib/aws-sigv4/request.rb', line 32 def endpoint=(endpoint) @endpoint = URI.parse(endpoint.to_s) end |
#headers ⇒ Hash<String,String>
47 48 49 |
# File 'lib/aws-sigv4/request.rb', line 47 def headers @headers end |
#headers=(headers) ⇒ Object
42 43 44 |
# File 'lib/aws-sigv4/request.rb', line 42 def headers=(headers) @headers = headers end |
#http_method ⇒ String
Returns One of ‘GET’, ‘PUT’, ‘POST’, ‘DELETE’, ‘HEAD’, or ‘PATCH’.
27 28 29 |
# File 'lib/aws-sigv4/request.rb', line 27 def http_method @http_method end |
#http_method=(http_method) ⇒ Object
22 23 24 |
# File 'lib/aws-sigv4/request.rb', line 22 def http_method=(http_method) @http_method = http_method end |