Sha256: 2992abea8a7362c313b02e1cce0a02a26afd0ba2c99f5d1b09c15c57d05c1a3d
Contents?: true
Size: 542 Bytes
Versions: 5
Compression:
Stored size: 542 Bytes
Contents
module Headhunter module Rack class CapturingMiddleware def initialize(app, headhunter) @app = app @hh = headhunter end def call(env) response = @app.call(env) process(response) response end def process(rack_response) status, headers, response = rack_response if html = extract_html_from(response) @hh.process('unknown', html) end end def extract_html_from(response) response[0] end end end end
Version data entries
5 entries across 5 versions & 1 rubygems