Class: GSGraph::Debugger::RequestFilter
- Inherits:
-
Object
- Object
- GSGraph::Debugger::RequestFilter
- Defined in:
- lib/gs_graph/debugger.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
6 7 8 9 |
# File 'lib/gs_graph/debugger.rb', line 6 def filter_request(request) started = "======= [GSGraph] API 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
14 15 16 17 |
# File 'lib/gs_graph/debugger.rb', line 14 def filter_response(request, response) finished = "======= [GSGraph] API REQUEST FINISHED =======" log '-' * 50, response.dump, finished end |