From f0b7834515707b753666e90b62db7628b217043d Mon Sep 17 00:00:00 2001 From: Joelle Maslak Date: Thu, 23 May 2019 16:06:04 -0600 Subject: Some code cleanup --- challenge-009/joelle-maslak/perl6/ch-3.p6 | 5 ++--- 1 file 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 = %{ sandbox => True } if $sandbox; my $resp = await $client.post('transmissions', body => %json); - if $resp.status == 200 { return } + return; CATCH { when X::Cro::HTTP::Error { -- cgit