lib/vaas/vaas_main.rb in vaas-4.0.0 vs lib/vaas/vaas_main.rb in vaas-4.1.0
- old
+ new
@@ -164,11 +164,11 @@
def upload(message, path)
Async do |task|
task.with_timeout(@timeout) do
token = message['upload_token']
url = message['url']
-
- client = Async::HTTP::Internet.new
+ endpoint = Async::HTTP::Endpoint.parse(url)
+ client = Async::HTTP::Client.new(endpoint, protocol: Async::HTTP::Protocol::HTTP1)
header = [['authorization', token]]
body = Protocol::HTTP::Body::File.open(File.join(path))
response = client.put(url, header, body)