Class: Rack::OAuth2::Debugger::RequestFilter
- Inherits:
-
Object
- Object
- Rack::OAuth2::Debugger::RequestFilter
- Defined in:
- lib/rack/oauth2/debugger/request_filter.rb
Instance Method Summary collapse
-
#filter_request(request) ⇒ Object
- Callback called in HTTPClient (before sending a request) request
-
HTTP::Message.
-
#filter_response(request, response) ⇒ Object
- Callback called in HTTPClient (after received a response) request
- HTTP::Message response
-
HTTP::Message.
Instance Method Details
#filter_request(request) ⇒ Object
Callback called in HTTPClient (before sending a request)
- request
-
HTTP::Message
7 8 9 10 |
# File 'lib/rack/oauth2/debugger/request_filter.rb', line 7 def filter_request(request) started = "======= [Rack::OAuth2] HTTP REQUEST STARTED =======" log started, request.dump end |
#filter_response(request, response) ⇒ Object
Callback called in HTTPClient (after received a response)
- request
-
HTTP::Message
- response
-
HTTP::Message
15 16 17 18 |
# File 'lib/rack/oauth2/debugger/request_filter.rb', line 15 def filter_response(request, response) finished = "======= [Rack::OAuth2] HTTP REQUEST FINISHED =======" log '-' * 50, response.dump, finished end |