Class: Aws::Sigv4::Request
- Inherits:
-
Object
- Object
- Aws::Sigv4::Request
- Defined in:
- gems/aws-sigv4/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.
13 14 15 16 17 18 19 20 21 |
# File 'gems/aws-sigv4/lib/aws-sigv4/request.rb', line 13 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
59 60 61 |
# File 'gems/aws-sigv4/lib/aws-sigv4/request.rb', line 59 def body @body end |
#body=(body) ⇒ Object
54 55 56 |
# File 'gems/aws-sigv4/lib/aws-sigv4/request.rb', line 54 def body=(body) @body = body end |
#endpoint ⇒ HTTP::URI, HTTPS::URI
39 40 41 |
# File 'gems/aws-sigv4/lib/aws-sigv4/request.rb', line 39 def endpoint @endpoint end |
#endpoint=(endpoint) ⇒ Object
34 35 36 |
# File 'gems/aws-sigv4/lib/aws-sigv4/request.rb', line 34 def endpoint=(endpoint) @endpoint = URI.parse(endpoint.to_s) end |
#headers ⇒ Hash<String,String>
49 50 51 |
# File 'gems/aws-sigv4/lib/aws-sigv4/request.rb', line 49 def headers @headers end |
#headers=(headers) ⇒ Object
44 45 46 |
# File 'gems/aws-sigv4/lib/aws-sigv4/request.rb', line 44 def headers=(headers) @headers = headers end |
#http_method ⇒ String
Returns One of 'GET', 'PUT', 'POST', 'DELETE', 'HEAD', or 'PATCH'.
29 30 31 |
# File 'gems/aws-sigv4/lib/aws-sigv4/request.rb', line 29 def http_method @http_method end |
#http_method=(http_method) ⇒ Object
24 25 26 |
# File 'gems/aws-sigv4/lib/aws-sigv4/request.rb', line 24 def http_method=(http_method) @http_method = http_method end |