File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,9 @@ class Client
4949 # The default value for `reconnect_reset_interval` in {#initialize}.
5050 DEFAULT_RECONNECT_RESET_INTERVAL = 60
5151
52+ # The default HTTP method for requests.
53+ DEFAULT_HTTP_METHOD = "GET"
54+
5255 #
5356 # Creates a new SSE client.
5457 #
@@ -106,7 +109,7 @@ def initialize(uri,
106109 proxy : nil ,
107110 logger : nil ,
108111 socket_factory : nil ,
109- method : "GET" ,
112+ method : DEFAULT_HTTP_METHOD ,
110113 payload : nil ,
111114 retry_enabled : true ,
112115 http_client_options : nil )
@@ -140,6 +143,8 @@ def initialize(uri,
140143 :proxy_address => @proxy . host ,
141144 :proxy_port => @proxy . port ,
142145 }
146+ base_http_client_options [ "proxy" ] [ :proxy_username ] = @proxy . user unless @proxy . user . nil?
147+ base_http_client_options [ "proxy" ] [ :proxy_password ] = @proxy . password unless @proxy . password . nil?
143148 end
144149
145150 options = http_client_options . is_a? ( Hash ) ? base_http_client_options . merge ( http_client_options ) : base_http_client_options
You can’t perform that action at this time.
0 commit comments