lib/httpx/plugins/grpc.rb in httpx-1.2.6 vs lib/httpx/plugins/grpc.rb in httpx-1.3.0
- old
+ new
@@ -108,13 +108,13 @@
super
end
end
module RequestBodyMethods
- def initialize(headers, _)
+ def initialize(*, **)
super
- if (compression = headers["grpc-encoding"])
+ if (compression = @headers["grpc-encoding"])
deflater_body = self.class.initialize_deflater_body(@body, compression)
@body = Transcoder::GRPCEncoding.encode(deflater_body || @body, compressed: !deflater_body.nil?)
else
@body = Transcoder::GRPCEncoding.encode(@body, compressed: false)
end