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
344 def initialize(*, **)
345   super
346 
347   return unless @options.stream
348 
349   @headers.delete("content-length")
350 
351   return unless @body
352 
353   return if @body.is_a?(Transcoder::Body::Encoder)
354 
355   raise Error, "bidirectional streams only allow the usage of the `:body` param to set request bodies." \
356                "You must encode it yourself if you wish to do so."
357 end

Public Instance methods

empty?()
[show source]
    # File lib/httpx/plugins/stream_bidi.rb
359 def empty?
360   return super unless @options.stream
361 
362   false
363 end