Skip to content
Snippets Groups Projects
Verified Commit 5fd2b20d authored by Alexander Olofsson's avatar Alexander Olofsson
Browse files

Fix issue with rubocop change

parent fc77c866
Branches
Tags
No related merge requests found
...@@ -80,7 +80,7 @@ module Passwordstate ...@@ -80,7 +80,7 @@ module Passwordstate
def request(method, api_path, options = {}) def request(method, api_path, options = {})
uri = URI(server_url + "/#{api_type}/" + api_path) uri = URI(server_url + "/#{api_type}/" + api_path)
uri.query = URI.encode_www_form(options.fetch(:query)) if options.key? :query uri.query = URI.encode_www_form(options.fetch(:query)) if options.key? :query
uri.query = nil unless uri.query&.any? uri.query = nil if uri.query.nil? || uri.query.empty?
req_obj = Net::HTTP.const_get(method.to_s.capitalize.to_sym).new uri req_obj = Net::HTTP.const_get(method.to_s.capitalize.to_sym).new uri
if options.key? :body if options.key? :body
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment