aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad S Anwar <Mohammad.Anwar@yahoo.com>2019-05-24 00:17:10 +0100
committerGitHub <noreply@github.com>2019-05-24 00:17:10 +0100
commite19b7833a9f14e91a13e72833edbb2ce93e3d290 (patch)
treecfdedc18b2dfdedc2a610262f1dea09cfe2036c8
parent420133dbf67ad5b4e8a8b199f7ceb660ff360907 (diff)
parentf0b7834515707b753666e90b62db7628b217043d (diff)
downloadperlweeklychallenge-club-e19b7833a9f14e91a13e72833edbb2ce93e3d290.tar.gz
perlweeklychallenge-club-e19b7833a9f14e91a13e72833edbb2ce93e3d290.tar.bz2
perlweeklychallenge-club-e19b7833a9f14e91a13e72833edbb2ce93e3d290.zip
Merge pull request #168 from jmaslak/joelle-9-1-1b
Some code cleanup
-rwxr-xr-xchallenge-009/joelle-maslak/perl6/ch-3.p65
1 files changed, 2 insertions, 3 deletions
diff --git a/challenge-009/joelle-maslak/perl6/ch-3.p6 b/challenge-009/joelle-maslak/perl6/ch-3.p6
index 25713d9c0c..22f54fdf7d 100755
--- a/challenge-009/joelle-maslak/perl6/ch-3.p6
+++ b/challenge-009/joelle-maslak/perl6/ch-3.p6
@@ -50,7 +50,6 @@ sub send-email(
base-uri => $url,
content-type => 'application/json',
headers => [ Authorization => $api-key ],
- http => 1.1,
);
my @recipients;
@@ -59,7 +58,6 @@ sub send-email(
}
my %json =
- options => %{ sandbox => True },
content => %{
from => $from,
subject => $subject,
@@ -67,9 +65,10 @@ sub send-email(
},
recipients => @recipients,
;
+ %json<options> = %{ sandbox => True } if $sandbox;
my $resp = await $client.post('transmissions', body => %json);
- if $resp.status == 200 { return }
+ return;
CATCH {
when X::Cro::HTTP::Error {