lib/rake/proxmox/proxmox_api.rb in rake-proxmox-0.5.0 vs lib/rake/proxmox/proxmox_api.rb in rake-proxmox-0.5.1

- old
+ new

@@ -60,11 +60,13 @@ log.filter(/(Csrfpreventiontoken:)\s+(.*)$/, '\1 "[REMOVED]"') log.filter(/(Cookie:)\s+(.*)$/, '\1 "[REMOVED]"') end # Last middleware must be the adapter: - conn.adapter :httpclient + conn.adapter :httpclient do |client| # yields HTTPClient + client.cookie_manager = nil + end end @auth_params = create_ticket end def get(path, args = {}) @@ -549,11 +551,10 @@ # Extract data or return error def check_response(response) if response.success? json_decode(response)['data'] else - 'NOK: error code = ' + response.status.to_s \ - + 'data = ' + response.body + "\n" + "NOK: error code = '#{response.status}' data = '#{response.body}'\n" end end # Methods manage http dialogs def http_action_post(url, payload = {})