module HTTPX::Plugins::GRPC::RequestBodyMethods

  1. lib/httpx/plugins/grpc.rb

Methods

Public Class

  1. new

Public Class methods

new(*, **)
[show source]
    # File lib/httpx/plugins/grpc.rb
115 def initialize(*, **)
116   super
117 
118   if (compression = @headers["grpc-encoding"])
119     deflater_body = self.class.initialize_deflater_body(@body, compression)
120     @body = Transcoder::GRPCEncoding.encode(deflater_body || @body, compressed: !deflater_body.nil?)
121   else
122     @body = Transcoder::GRPCEncoding.encode(@body, compressed: false)
123   end
124 end