class Aws::Sigv4::Request
Public Class Methods
new(options = {})
click to toggle source
@option options [required, String] :http_method @option options [required, HTTP::URI, HTTPS::URI, String] :endpoint @option options [Hash<String,String>] :headers ({}) @option options [String, IO] :body (”)
# File lib/aws-sigv4/request.rb, line 11 def initialize(options = {}) @http_method = nil @endpoint = nil @headers = {} @body = '' options.each_pair do |attr_name, attr_value| send("#{attr_name}=", attr_value) end end
Public Instance Methods
body()
click to toggle source
@return [String, IO]
# File lib/aws-sigv4/request.rb, line 57 def body @body end
body=(body)
click to toggle source
@param [String, IO] body
# File lib/aws-sigv4/request.rb, line 52 def body=(body) @body = body end
endpoint()
click to toggle source
@return [HTTP::URI, HTTPS::URI]
# File lib/aws-sigv4/request.rb, line 37 def endpoint @endpoint end
endpoint=(endpoint)
click to toggle source
@param [String, HTTP::URI, HTTPS::URI] endpoint
# File lib/aws-sigv4/request.rb, line 32 def endpoint=(endpoint) @endpoint = URI.parse(endpoint.to_s) end
headers()
click to toggle source
@return [Hash<String,String>]
# File lib/aws-sigv4/request.rb, line 47 def headers @headers end
headers=(headers)
click to toggle source
@param [Hash] headers
# File lib/aws-sigv4/request.rb, line 42 def headers=(headers) @headers = headers end
http_method()
click to toggle source
@return [String] One of ‘GET’, ‘PUT’, ‘POST’, ‘DELETE’, ‘HEAD’, or ‘PATCH’
# File lib/aws-sigv4/request.rb, line 27 def http_method @http_method end
http_method=(http_method)
click to toggle source
@param [String] http_method
One of ‘GET’, ‘PUT’, ‘POST’, ‘DELETE’, ‘HEAD’, or ‘PATCH’
# File lib/aws-sigv4/request.rb, line 22 def http_method=(http_method) @http_method = http_method end