module HTTPX::Plugins::StreamBidi::RequestBodyMethods

  1. lib/httpx/plugins/stream_bidi.rb

Methods

Public Class

  1. new

Public Instance

  1. empty?

Public Class methods

new(*, **)
[show source]
    # File lib/httpx/plugins/stream_bidi.rb
338 def initialize(*, **)
339   super
340 
341   return unless @options.stream
342 
343   @headers.delete("content-length")
344 
345   return unless @body
346 
347   return if @body.is_a?(Transcoder::Body::Encoder)
348 
349   raise Error, "bidirectional streams only allow the usage of the `:body` param to set request bodies." \
350                "You must encode it yourself if you wish to do so."
351 end

Public Instance methods

empty?()
[show source]
    # File lib/httpx/plugins/stream_bidi.rb
353 def empty?
354   return super unless @options.stream
355 
356   false
357 end