Support gzip encoding on Request (#7425)
This commit is contained in:
		
							parent
							
								
									d006271514
								
							
						
					
					
						commit
						1b42ea9f2c
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -51,7 +51,7 @@ class Request
 | 
			
		|||
  end
 | 
			
		||||
 | 
			
		||||
  def headers
 | 
			
		||||
    (@account ? @headers.merge('Signature' => signature) : @headers).without(REQUEST_TARGET)
 | 
			
		||||
    (@account ? @headers.merge('Signature' => signature) : @headers).reverse_merge('Accept-Encoding' => 'gzip').without(REQUEST_TARGET)
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  private
 | 
			
		||||
| 
						 | 
				
			
			@ -100,7 +100,7 @@ class Request
 | 
			
		|||
  end
 | 
			
		||||
 | 
			
		||||
  def http_client
 | 
			
		||||
    @http_client ||= HTTP.timeout(:per_operation, timeout).follow(max_hops: 2)
 | 
			
		||||
    @http_client ||= HTTP.use(:auto_inflate).timeout(:per_operation, timeout).follow(max_hops: 2)
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def use_proxy?
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue