Skip to content
LWP::Simple quick & dirty implementation for Rakudo
Other
  1. Other 100.0%
Branch: master
Clone or download
This branch is 93 commits ahead of niner:master.

Latest commit

Latest commit eb48ab9 Oct 13, 2019

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib/LWP
t
.gitignore
.travis.yml
Changes
META6.json
README.md

README.md

LWP::Simple for Perl 6

Build Status

This is a quick & dirty implementation of a LWP::Simple clone for Rakudo Perl 6; it does both GET and POST requests.

Dependencies

LWP::Simple depends on the modules MIME::Base64 and URI, which you can find at http://modules.perl6.org/. The tests depends on JSON::Tiny.

Write:

zef install --deps-only .

You'll have to install IO::Socket::SSL via

zef install IO::Socket::SSL

if you want to work with https too.

Synopsis

use LWP::Simple;

my $content = LWP::Simple.get("https://perl6.org");

my $response = LWP::Simple.post("https://somewhere.topo.st", { so => True }

Current status

You can use HTTP::UserAgent instead, with more options. However, this module will do just fine in most cases.

Use

Use the installed commands:

 lwp-download.p6  http://eu.httpbin.org

Or

 lwp-download.p6  https://docs.perl6.org 

If ÌO::Socket::SSL has been installed.

lwp-get.p6  https://perl6.org

will instead print to standard output.

You can’t perform that action at this time.