Skip to content

Instantly share code, notes, and snippets.

@scmorrison
Created January 6, 2016 11:28
Show Gist options
  • Save scmorrison/06de2b2f54d7b9e7edeb to your computer and use it in GitHub Desktop.
Save scmorrison/06de2b2f54d7b9e7edeb to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl6
use v6;
use HTTP::UserAgent;
my $ua = HTTP::UserAgent.new;
$ua.timeout = 10;
my $response = $ua.get("https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/index.json");
if $response.is-success {
say $response.content;
} else {
die $response.status-line;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment