module HTTPX::Plugins::Compression::RequestBodyMethods

  1. lib/httpx/plugins/compression.rb

Methods

Public Class

  1. new

Public Class methods

new (*)
[show source]
   # File lib/httpx/plugins/compression.rb
35 def initialize(*)
36   super
37   return if @body.nil?
38 
39   @headers.get("content-encoding").each do |encoding|
40     @body = Encoder.new(@body, Compression.registry(encoding).encoder)
41   end
42   @headers["content-length"] = @body.bytesize unless chunked?
43 end