From 0a36a8735d99a5aafac7a522affccf403efa6e28 Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Tue, 8 May 2018 16:22:18 -0300 Subject: Use $.post instead --- lib/Matrix/Client/Requester.pm6 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib') 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) { -- cgit v1.2.3-54-g00ecf