mirror of
https://github.com/postalserver/postal.git
synced 2026-10-20 11:17:01 +00:00
When Net::HTTP::Post is being instantiated only the uri.path was being passed (#924)
fixed bug causing webhook not to trigger unless query params were present
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ module Postal
|
||||
def self.request(method, url, options = {})
|
||||
options[:headers] ||= {}
|
||||
uri = URI.parse(url)
|
||||
request = method.new(uri.path.length == 0 ? "/" : uri.path)
|
||||
request = method.new((uri.path.length == 0 ? "/" : uri.path) + (uri.query ? "?" + uri.query : ""))
|
||||
options[:headers].each { |k,v| request.add_field k, v }
|
||||
|
||||
if options[:username] || uri.user
|
||||
|
||||
Reference in New Issue
Block a user