Skip to content

Commit cbf30b9

Browse files
committed
Remove HTTP::UserAgent
Reducing number of dependencies. Closes #4509
1 parent b73e34a commit cbf30b9

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

META6.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"auth": "raku",
1010
"test-depends": [
1111
"Cro::HTTP::Client",
12-
"HTTP::UserAgent",
1312
"File::Temp",
1413
"Test::META",
1514
"Doc::TypeGraph",

util/create-brackets-table.raku

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ sub int2hex($i --> Str) {
173173

174174
sub get-brackets(:$grammar-file, :$refresh!, :$debug! --> List) {
175175
# Extracts the data from the nqp/HLL/Grammar.nqp file.
176-
use HTTP::UserAgent;
176+
use Cro::HTTP::Client;
177177

178178
# The local copy of the nqp repo's source file
179179
my $f = $grammar-file;
@@ -189,10 +189,9 @@ sub get-brackets(:$grammar-file, :$refresh!, :$debug! --> List) {
189189
}
190190
# Otherwise, get it from Github
191191
else {
192-
my $ua = HTTP::UserAgent.new;
193-
$ua.timeout = 10;
192+
my $ua = Cro::HTTP::Client.new;
194193
my $uri = "https://raw.githubusercontent.com/Raku/nqp/main" ~ $end-path;
195-
my $response = $ua.get($uri);
194+
my $response = await $ua.get: $uri;
196195
if $response.is-success {
197196
spurt $f, $response.content;
198197
}

0 commit comments

Comments
 (0)