Sha256: 7ffb47716f3c5469d4f7b32c486825ff4a3d90748065e1f6d0fe249c440c289b

Contents?: true

Size: 675 Bytes

Versions: 60

Compression:

Stored size: 675 Bytes

Contents

module FbGraph
  module Debugger
    class RequestFilter
      # Callback called in HTTPClient (before sending a request)
      # request:: HTTP::Message
      def filter_request(request)
        started = "======= [FbGraph] API REQUEST STARTED ======="
        FbGraph.logger.info [started, request.dump].join("\n")
      end

      # Callback called in HTTPClient (after received a response)
      # request::  HTTP::Message
      # response:: HTTP::Message
      def filter_response(request, response)
        finished = "======= [FbGraph] API REQUEST FINISHED ======="
        FbGraph.logger.info ['-' * 50, response.dump, finished].join("\n")
      end
    end
  end
end

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
fb_graph-2.6.1 lib/fb_graph/debugger.rb
fb_graph-2.6.0 lib/fb_graph/debugger.rb
fb_graph-2.5.9 lib/fb_graph/debugger.rb
fb_graph-2.5.8 lib/fb_graph/debugger.rb
fb_graph-2.5.7 lib/fb_graph/debugger.rb
fb_graph-2.5.6 lib/fb_graph/debugger.rb
fb_graph-2.5.5 lib/fb_graph/debugger.rb
fb_graph-2.5.4 lib/fb_graph/debugger.rb
fb_graph-2.5.3 lib/fb_graph/debugger.rb
fb_graph-2.5.2 lib/fb_graph/debugger.rb
fb_graph-2.5.1 lib/fb_graph/debugger.rb
fb_graph-2.5.0 lib/fb_graph/debugger.rb
fb_graph-2.4.20 lib/fb_graph/debugger.rb
fb_graph-2.4.19 lib/fb_graph/debugger.rb
fb_graph-2.4.18 lib/fb_graph/debugger.rb
fb_graph-2.4.17 lib/fb_graph/debugger.rb
fb_graph-2.4.16 lib/fb_graph/debugger.rb
fb_graph-2.4.15 lib/fb_graph/debugger.rb
fb_graph-2.4.14 lib/fb_graph/debugger.rb
fb_graph-2.4.13 lib/fb_graph/debugger.rb