```ruby
module HTTP
  class Request
    def webmock_signature
      ::WebMock::RequestSignature.new(verb, uri.to_s, {
        headers: headers.to_h,
        body: body
      })
    end
  end
end
```

Make it compatible with the newest http.rb version (3.0.0)
user
```ruby
module HTTP
  class Request
    def webmock_signature
      request_body = if defined?(HTTP::Request::Body)
                       ''.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
```
assistant