Sha256: 46861a8aa41f07996ca380168de900abcbe8717e3361fe9f02069e0fb57c2364

Contents?: true

Size: 447 Bytes

Versions: 4

Compression:

Stored size: 447 Bytes

Contents

# frozen_string_literal: true

module HTTP
  class Request
    def webmock_signature
      request_body = if defined?(HTTP::Request::Body)
                       String.new.tap { |string| body.each { |part| string << part } }
                     else
                       body
                     end

      ::WebMock::RequestSignature.new(verb, uri.to_s, {
        headers: headers.to_h,
        body: request_body
      })
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/webmock-3.19.1/lib/webmock/http_lib_adapters/http_rb/request.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/webmock-3.19.1/lib/webmock/http_lib_adapters/http_rb/request.rb
webmock-3.19.1 lib/webmock/http_lib_adapters/http_rb/request.rb
webmock-3.19.0 lib/webmock/http_lib_adapters/http_rb/request.rb