bake/async/http.rb in async-http-0.76.0 vs bake/async/http.rb in async-http-0.77.0

- old
+ new

@@ -1,15 +1,15 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2020-2023, by Samuel Williams. +# Copyright, 2020-2024, by Samuel Williams. # Fetch the specified URL and print the response. # @param url [String] the URL to parse and fetch. # @param method [String] the HTTP method to use. def fetch(url, method:) - require 'async/http/internet' - require 'kernel/sync' + require "async/http/internet" + require "kernel/sync" terminal = Console::Terminal.for($stdout) terminal[:request] = terminal.style(:blue, nil, :bold) terminal[:response] = terminal.style(:green, nil, :bold) terminal[:length] = terminal.style(nil, nil, :bold)