LibCurl::HTTP
NAME
LibCurl::HTTP
SYNOPSIS
use LibCurl::HTTP;
my $http = LibCurl::HTTP.new;
say $http.GET('http://example.com').perform.content;
say $http.GET('http://example.com', 'myfile').perform.response-code;
say $http.HEAD('http://example.com').perform.response-code;
$http.DELETE('http://example.com').perform;
$http.PUT('http://example.com', 'myfile').perform;
$http.POST('http://example.com/form.html', 'name=foo&opt=value').perform;
DESCRIPTION
A thin subclass of LibCurl::Easy
that adds extra methods for the main HTTP methods.
METHODS
method GET(filename?)
Set :httpget, URL => filename.
method HEAD($URL)
Set :nobody, URL => $URL
method DELETE($URL)
Set customrequest => 'DELETE', URL => $URL
method PUT(filename)
Set URL => filename
method POST(content)
Set URL => content