Sha256: ee7a83a71ea007cc347b4897d92a732b2eea6ae5daf8c783863f077196d90ead

Contents?: true

Size: 355 Bytes

Versions: 2

Compression:

Stored size: 355 Bytes

Contents

# encoding: utf-8

module HTTPkit
  class Client::BodyHandler
    def perform(request)
      request = request.with_headers(request.body_headers)

      yield banana_request(request)
    end

    private

    def banana_request(request)
      if !request.body_included?
        request.with_body('')
      else
        request
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
httpkit-0.6.0 lib/httpkit/client/body_handler.rb
httpkit-0.6.0.pre.5 lib/httpkit/client/body_handler.rb