mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-23 03:18:51 +00:00
Update code for Crystal 0.36.0
Rename `HTTPClient@socket` to `HTTPClient@io`, see https://github.com/crystal-lang/crystal/pull/9543. Rename `URI#full_path` to `URI#request_target`, see https://github.com/crystal-lang/crystal/pull/10099.
This commit is contained in:
@@ -71,14 +71,14 @@ end
|
||||
class HTTPClient < HTTP::Client
|
||||
def set_proxy(proxy : HTTPProxy)
|
||||
begin
|
||||
@socket = proxy.open(host: @host, port: @port, tls: @tls, connection_options: proxy_connection_options)
|
||||
@io = proxy.open(host: @host, port: @port, tls: @tls, connection_options: proxy_connection_options)
|
||||
rescue IO::Error
|
||||
@socket = nil
|
||||
@io = nil
|
||||
end
|
||||
end
|
||||
|
||||
def unset_proxy
|
||||
@socket = nil
|
||||
@io = nil
|
||||
end
|
||||
|
||||
def proxy_connection_options
|
||||
|
||||
Reference in New Issue
Block a user