Module: HTTPX::Plugins::GRPC::RequestBodyMethods
- Defined in:
- lib/httpx/plugins/grpc.rb
Instance Method Summary collapse
Instance Method Details
#initialize ⇒ Object
126 127 128 129 130 131 132 133 134 135 |
# File 'lib/httpx/plugins/grpc.rb', line 126 def initialize(*, **) super 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 end |