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
126 def initialize(*, **)
127   super
128 
129   if (compression = @headers["grpc-encoding"])
130     deflater_body = self.class.initialize_deflater_body(@body, compression)
131     @body = Transcoder::GRPCEncoding.encode(deflater_body || @body, compressed: !deflater_body.nil?)
132   else
133     @body = Transcoder::GRPCEncoding.encode(@body, compressed: false)
134   end
135 end