Class: ActiveResource::Connection
- Inherits:
-
Object
- Object
- ActiveResource::Connection
- Defined in:
- app/models/rest_api/base.rb
Instance Method Summary collapse
-
#get(path, headers = {}) ⇒ Object
Changes made in commit github.com/rails/rails/commit/51f1f550dab47c6ec3dcdba7b153258e2a0feb69#activeresource/lib/active_resource/base.rb make GET consistent with other verbs (return response).
-
#new_http ⇒ Object
Allow integrated debugging.
Instance Method Details
#get(path, headers = {}) ⇒ Object
Changes made in commit github.com/rails/rails/commit/51f1f550dab47c6ec3dcdba7b153258e2a0feb69#activeresource/lib/active_resource/base.rb make GET consistent with other verbs (return response)
14 15 16 |
# File 'app/models/rest_api/base.rb', line 14 def get(path, headers = {}) with_auth { request(:get, path, build_request_headers(headers, :get, self.site.merge(path))) } #changed, remove .body at end, removed format decode end |
#new_http ⇒ Object
Allow integrated debugging
21 22 23 24 25 26 27 28 29 30 |
# File 'app/models/rest_api/base.rb', line 21 def new_http http = if @proxy Net::HTTP.new(@site.host, @site.port, @proxy.host, @proxy.port, @proxy.user, @proxy.password) else Net::HTTP.new(@site.host, @site.port) end Rails.logger.debug "Connecting to #{@site}" http.set_debug_output $stderr if RestApi.debug? http end |