lib/fb_graph/node.rb in fb_graph-2.0.2 vs lib/fb_graph/node.rb in fb_graph-2.1.0.alpha

- old
+ new

@@ -38,25 +38,31 @@ protected def get(params = {}) handle_response do - HTTPClient.new.get build_endpoint(params), build_params(params) + http_client.get build_endpoint(params), build_params(params) end end def post(params = {}) handle_response do - HTTPClient.new.post build_endpoint(params), build_params(params) + http_client.post build_endpoint(params), build_params(params) end end def delete(params = {}) _endpoint_, _params_ = build_endpoint(params), build_params(params) _endpoint_ = [_endpoint_, _params_.try(:to_query)].compact.join('?') handle_response do - HTTPClient.new.delete _endpoint_ + http_client.delete _endpoint_ end + end + + def http_client + _http_client_ = HTTPClient.new + _http_client_.request_filter << Debugger::RequestFilter.new if FbGraph.debugging? + _http_client_ end private def build_endpoint(params = {}) \ No newline at end of file