Skip to content

Commit

Permalink
Rename some more perl6 references to raku
Browse files Browse the repository at this point in the history
  • Loading branch information
ugexe committed Sep 8, 2022
1 parent 85dae84 commit b6edb79
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Simple access to the http `POST` client api (Still lacking anything beyond basic
#### Net::HTTP::Transport

my $url = Net::HTTP::URL.new($abs-url);
my $req = Net::HTTP::Request.new(:$url, :method<GET>, :User-Agent<perl6-net-http>);
my $req = Net::HTTP::Request.new(:$url, :method<GET>, :User-Agent<raku-net-http>);
my $transport = Net::HTTP::Transport.new;
my $response = $transport.round-trip($req);

Expand Down
2 changes: 1 addition & 1 deletion lib/Net/HTTP/GET.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Net::HTTP::GET {
my $url = Net::HTTP::URL.new($abs-url);
with Net::HTTP::Request.new(:$url, :method<GET>) -> $req {
temp %header<Connection> //= <keep-alive>;
temp %header<User-Agent> //= <perl6-net-http>;
temp %header<User-Agent> //= <raku-net-http>;
$req.body = $body || Buf.new;
$req.header = %header;
samewith($req, |c);
Expand Down
4 changes: 2 additions & 2 deletions lib/Net/HTTP/POST.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ class Net::HTTP::POST {
proto method CALL-ME(|) {*}
multi method CALL-ME(Str:D $abs-url, :%header is copy, :$body?, |c --> Response) {
my $url = Net::HTTP::URL.new($abs-url);
with Net::HTTP::Request.new(:$url, :$body, :method<POST>, :User-Agent<perl6-net-http>) -> $req {
with Net::HTTP::Request.new(:$url, :$body, :method<POST>, :User-Agent<raku-net-http>) -> $req {
temp %header<Connection> //= <keep-alive>;
temp %header<User-Agent> //= <perl6-net-http>;
temp %header<User-Agent> //= <raku-net-http>;
$req.body = $body || Buf.new;
$req.header = %header;
samewith($req, |c);
Expand Down
4 changes: 2 additions & 2 deletions t/03-request.rakutest
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ use Net::HTTP::URL;
subtest {
my $want-str = q{GET /search?x=1 HTTP/1.1}
~ "\r\n" ~ q{Host: google.com}
~ "\r\n" ~ q{User-Agent: perl6-net-http}
~ "\r\n" ~ q{User-Agent: raku-net-http}
~ "\r\n\r\n";

my $url = Net::HTTP::URL.new("http://google.com/search?x=1");
my $method = 'GET';
my %header = :Host<google.com>, :User-Agent("perl6-net-http");
my %header = :Host<google.com>, :User-Agent("raku-net-http");

my $request = Net::HTTP::Request.new(:$url, :$method, :%header);
is $request.Str.chars, $want-str.chars;
Expand Down
4 changes: 2 additions & 2 deletions xt/100-dialer.rakutest
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use Net::HTTP::Request;
subtest {
my $url = Net::HTTP::URL.new("http://httpbin.org/ip");
my $method = 'GET';
my %header = :Host<httpbin.org>, :User-Agent("perl6-net-http");
my %header = :Host<httpbin.org>, :User-Agent("raku-net-http");
my $request = Net::HTTP::Request.new(:$url, :$method, :%header);
my $socket = Net::HTTP::Dialer.new.dial($request);

Expand All @@ -21,7 +21,7 @@ if Net::HTTP::Dialer.?can-ssl {
subtest {
my $url = Net::HTTP::URL.new("https://httpbin.org/ip");
my $method = 'GET';
my %header = :Host<httpbin.org>, :User-Agent("perl6-net-http");
my %header = :Host<httpbin.org>, :User-Agent("raku-net-http");
my $request = Net::HTTP::Request.new(:$url, :$method, :%header);
my $socket = Net::HTTP::Dialer.new.dial($request);

Expand Down
8 changes: 4 additions & 4 deletions xt/500-transport.rakutest
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use Net::HTTP::Request;
subtest {
my $url = Net::HTTP::URL.new('http://jigsaw.w3.org/HTTP/ChunkedScript');
my $req = Net::HTTP::Request.new: :$url, :method<GET>,
header => :Connection<keep-alive>, :User-Agent<perl6-net-http>;
header => :Connection<keep-alive>, :User-Agent<raku-net-http>;

my $transport = Net::HTTP::Transport.new;
my $res = $transport.round-trip($req);
Expand All @@ -21,7 +21,7 @@ subtest {
subtest {
my $url = Net::HTTP::URL.new('http://jigsaw.w3.org/HTTP/ChunkedScript');
my $req = Net::HTTP::Request.new: :$url, :method<GET>,
header => :Connection<keep-alive>, :User-Agent<perl6-net-http>;
header => :Connection<keep-alive>, :User-Agent<raku-net-http>;

my $instances = 5;
my $transport = Net::HTTP::Transport.new;
Expand All @@ -37,7 +37,7 @@ if Net::HTTP::Dialer.?can-ssl {
subtest {
my $url = Net::HTTP::URL.new('https://jigsaw.w3.org/HTTP/ChunkedScript');
my $req = Net::HTTP::Request.new: :$url, :method<GET>,
header => :Connection<close>, :User-Agent<perl6-net-http>;
header => :Connection<close>, :User-Agent<raku-net-http>;

my $transport = Net::HTTP::Transport.new;
my $res = $transport.round-trip($req);
Expand All @@ -55,7 +55,7 @@ if Net::HTTP::Dialer.?can-ssl {
subtest {
my $url = Net::HTTP::URL.new('https://jigsaw.w3.org/HTTP/ChunkedScript');
my $req = Net::HTTP::Request.new: :$url, :method<GET>,
header => :Connection<close>, :User-Agent<perl6-net-http>;
header => :Connection<close>, :User-Agent<raku-net-http>;

my $instances = 5;
my $transport = Net::HTTP::Transport.new;
Expand Down

0 comments on commit b6edb79

Please sign in to comment.