Sha256: f119fab2dbd4bdedfa76c3ec3caea4085262349ced5d5831554a19dedc65b430
Contents?: true
Size: 543 Bytes
Versions: 8
Compression:
Stored size: 543 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
8 entries across 8 versions & 1 rubygems