class AWS::Core::Http::Request
and parses the actual response.
by a HTTP handler class that sends the actual request
a basic HTTP request, but will not make one. It is consumed
Base class for all service reqeusts. This class describes
def add_param name_or_param, value = nil
-
param_obj
(Param
) -- -
param_value
(String
) -- Leave blank for sub resources -
param_name
(String
) --
Overloads:
-
add_param(param_obj)
-
add_param(param_name, param_value = nil)
def add_param name_or_param, value = nil if name_or_param.kind_of?(Param) @params << name_or_param else @params << Param.new(name_or_param, value) end end
def body
-
(String, nil)
- Returns the request body.
def body url_encoded_params end
def get_param param_name
- Private: -
def get_param param_name @params.detect{|p| p.name == param_name } || raise("undefined param #{param_name}") end
def initialize
def initialize @host = nil @http_method = 'POST' @path = '/' @headers = CaseInsensitiveHash.new @params = [] @use_ssl = true @port = nil @default_read_timeout = 60 end
def param_value_for param_name
- Private: -
def param_value_for param_name param = @params.detect{|p| p.name == param_name } param ? param.value : nil end
def port
-
(Integer)
- Returns the port the request will be made over.
def port @port || (use_ssl? ? 443 : 80) end
def port= port_number
-
port_number
(Integer, nil
) --
def port= port_number @port = port_number end
def querystring
-
(String, nil)
- Returns the requesty querystring.
def querystring nil end
def read_timeout
- Private: -
def read_timeout default_read_timeout end
def ssl_ca_file
-
(String)
- Path to a bundle of CA certs in PEM format;
def ssl_ca_file @ssl_ca_file end
def ssl_ca_file=(ca_file)
-
ca_file
(String
) -- Path to a bundle of CA certs in PEM
def ssl_ca_file=(ca_file) @ssl_ca_file = ca_file end
def ssl_ca_path
-
(String)
- Path to a bundle of CA certs in PEM format;
def ssl_ca_path @ssl_ca_path end
def ssl_ca_path=(ca_path)
-
ca_path
(String
) -- Path to a bundle of CA certs in PEM
def ssl_ca_path=(ca_path) @ssl_ca_path = ca_path end
def ssl_verify_peer=(verify_peer)
-
verify_peer
(Boolean
) -- If the client should verify the
def ssl_verify_peer=(verify_peer) @ssl_verify_peer = verify_peer end
def ssl_verify_peer?
-
(Boolean)
- If the client should verify the peer
def ssl_verify_peer? @ssl_verify_peer end
def uri
-
(String)
- the request uri
def uri querystring ? "#{path}?#{querystring}" : path end
def url_encoded_params
-
(String)
- Returns the request params url encoded, or nil if
def url_encoded_params if @params.empty? nil else @params.sort.collect{|p| p.encoded }.join('&') end end
def use_ssl= state
-
state
(Boolean
) -- If the request should be sent over ssl or not.
def use_ssl= state @use_ssl = state end
def use_ssl?
-
(Boolean)
- If this request should be sent over ssl or not.
def use_ssl? @use_ssl end