@@ -107,13 +107,13 @@ def agent
107
107
http . headers [ :content_type ] = "application/json"
108
108
http . headers [ :user_agent ] = user_agent
109
109
if basic_authenticated?
110
- http . basic_auth ( @login , @password )
110
+ http . request : basic_auth, @login , @password
111
111
elsif token_authenticated?
112
- http . authorization 'token' , @access_token
112
+ http . request : authorization, 'token' , @access_token
113
113
elsif bearer_authenticated?
114
- http . authorization 'Bearer' , @bearer_token
114
+ http . request : authorization, 'Bearer' , @bearer_token
115
115
elsif application_authenticated?
116
- http . basic_auth ( @client_id , @client_secret )
116
+ http . request : basic_auth, @client_id , @client_secret
117
117
end
118
118
end
119
119
end
@@ -176,7 +176,7 @@ def sawyer_options
176
176
:links_parser => Sawyer ::LinkParsers ::Simple . new
177
177
}
178
178
conn_opts = @connection_options
179
- conn_opts [ :builder ] = @middleware if @middleware
179
+ conn_opts [ :builder ] = @middleware . dup if @middleware
180
180
conn_opts [ :proxy ] = @proxy if @proxy
181
181
if conn_opts [ :ssl ] . nil?
182
182
conn_opts [ :ssl ] = { :verify_mode => @ssl_verify_mode } if @ssl_verify_mode
0 commit comments