Skip to content

Commit bba8fb1

Browse files
author
Jacob Burkhart
committed
It's bad form to use URL query parameters with a non-GET request, please use :body
1 parent 9f392bc commit bba8fb1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/ey-core/client.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,10 @@ def request(options={})
453453
body = options[:body]
454454
headers = options[:headers] || {}
455455

456+
if (method != :get) && !params.empty?
457+
raise "It's bad form to use URL query parameters with a non-GET request, please use :body"
458+
end
459+
456460
default_content_type = if !body && !params.empty?
457461
"application/x-www-form-urlencoded"
458462
else

0 commit comments

Comments
 (0)