From bd6160b445a127408140efb81be5d9aaed74c1d0 Mon Sep 17 00:00:00 2001 From: Kanezoh Date: Wed, 9 Jun 2021 21:44:11 +0900 Subject: [PATCH] don't set params if params is empty --- src/mechanize/http/agent.cr | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mechanize/http/agent.cr b/src/mechanize/http/agent.cr index 412a4e6..03f1dd6 100644 --- a/src/mechanize/http/agent.cr +++ b/src/mechanize/http/agent.cr @@ -52,6 +52,7 @@ module MechanizeCr private def resolve_parameters(uri, method, params) case method when :get + return uri, nil if params.empty? query = URI::Params.encode(params) uri.query = query return uri, nil