The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

HTTP::Tiny::FileProtocol - Add support for file:// protocol to HTTP::Tiny

VERSION

version 0.07

SYNOPSIS

  use HTTP::Tiny::FileProtocol;

  my $http = HTTP::Tiny->new;

  my $response        = $http->get( 'file:///tmp/data.txt' );
  my $mirror_response = $http->get( 'file:///tmp/data.txt', 'data.txt' );

will return

{
    success => 1,
    status  => 200,
    content => $content_of_file
    headers => {
        content_type   => 'text/plain',
        content_length => $length_of_content,
    },
}

AUTHOR

Renee Baecker <reneeb@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2017 by Renee Baecker.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)