local-ch / lhc

🚀 Advanced HTTP Client for Ruby. Fueled with interceptors.
GNU General Public License v3.0
43 stars 1 forks source link

Simplify interceptors #117

Closed 10xSebastian closed 6 years ago

10xSebastian commented 6 years ago

Makes request & response available from within the whole interceptor instance which simplifies writing an interceptor.

def before_raw_request(request)
def before_request(request)
def after_request(request)
def before_response(request)
def after_response(response)

becomes

def before_raw_request
def before_request
def after_request
def before_response
def after_response

and response and request can be called within the whole interceptor instance.