1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2026-01-17 05:33:35 +00:00

Adds support for Basic Auth in HTTP Endpoint URLs (#884)

هذا الالتزام موجود في:
Paul Cleary
2019-11-22 17:26:55 +00:00
ملتزم من قبل Adam Cooke
الأصل a75c125931
التزام 10f4808fbf

عرض الملف

@@ -18,8 +18,8 @@ module Postal
request = method.new(uri.path.length == 0 ? "/" : uri.path) request = method.new(uri.path.length == 0 ? "/" : uri.path)
options[:headers].each { |k,v| request.add_field k, v } options[:headers].each { |k,v| request.add_field k, v }
if options[:username] if options[:username] || uri.user
request.basic_auth(options[:username], options[:password]) request.basic_auth(options[:username] || uri.user, options[:password] || uri.password)
end end
if options[:params].is_a?(Hash) if options[:params].is_a?(Hash)