Sha256: f15ea1e8991f617e238eed5e6cb840d60131f57c5c326594b4398a30e535c562
Contents?: true
Size: 953 Bytes
Versions: 39
Compression:
Stored size: 953 Bytes
Contents
# encoding: utf-8 module OneApm module Support module HTTPClients class NetHTTPRequest def initialize(connection, request) @connection = connection @request = request end def type 'Net::HTTP' end def host if hostname = self['host'] hostname.split(':').first else @connection.address end end def method @request.method end def [](key) @request[key] end def []=(key, value) @request[key] = value end def uri case @request.path when /^https?:\/\// URI(@request.path) else scheme = @connection.use_ssl? ? 'https' : 'http' URI("#{scheme}://#{@connection.address}:#{@connection.port}#{@request.path}") end end end end end end
Version data entries
39 entries across 39 versions & 1 rubygems