summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatias Linares <matiaslina@openmailbox.org>2018-05-08 16:22:18 -0300
committerMatias Linares <matiaslina@openmailbox.org>2018-05-08 16:22:18 -0300
commit0a36a8735d99a5aafac7a522affccf403efa6e28 (patch)
tree7f6572f96d346d539aaac1b3b58596171887b85d /lib
parent7f1024484ec5b9284f924efa4c7d774bb3295cb2 (diff)
downloadperl6-matrix-client-0a36a8735d99a5aafac7a522affccf403efa6e28.tar.gz
Use $.post instead
Diffstat (limited to 'lib')
-rw-r--r--lib/Matrix/Client/Requester.pm63
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Matrix/Client/Requester.pm6 b/lib/Matrix/Client/Requester.pm6
index 9cabf9c..ca1f0e1 100644
--- a/lib/Matrix/Client/Requester.pm6
+++ b/lib/Matrix/Client/Requester.pm6
@@ -44,13 +44,12 @@ multi method post(Str $path, Str $json, :$media = False) {
my $req = HTTP::Request.new(POST => $url,
Content-Type => 'application/json');
$req.add-content($json);
-
return self!handle-error($!ua.request($req));
}
multi method post(Str $path, :$media = False, *%params) {
my $json = to-json(%params);
- nextwith($path, $json, :$media)
+ $.post($path, $json, :$media)
}
method post-bin(Str $path, Buf $buf, :$content-type) {