Class: Aws::Rest::Request::Headers Private
- Inherits:
- 
      Object
      
        - Object
- Aws::Rest::Request::Headers
 
- Includes:
- Seahorse::Model::Shapes
- Defined in:
- lib/aws-sdk-core/rest/request/headers.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #apply(http_req, params) ⇒ Object private
- 
  
    
      #initialize(rules)  ⇒ Headers 
    
    
  
  
  
    constructor
  
  
  
  
  
  private
  
    A new instance of Headers. 
Constructor Details
#initialize(rules) ⇒ Headers
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Headers.
| 14 15 16 | # File 'lib/aws-sdk-core/rest/request/headers.rb', line 14 def initialize(rules) @rules = rules end | 
Instance Method Details
#apply(http_req, params) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
| 20 21 22 23 24 25 26 27 28 29 30 | # File 'lib/aws-sdk-core/rest/request/headers.rb', line 20 def apply(http_req, params) @rules.shape.members.each do |name, ref| value = params[name] next if value.nil? case ref.location when 'header' then apply_header_value(http_req.headers, ref, value) when 'headers' then apply_header_map(http_req.headers, ref, value) end end end |