HTTP::Tiny::FileProtocol - Add support for file:// protocol to HTTP::Tiny
version 0.07
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, }, }
Renee Baecker <reneeb@cpan.org>
This software is Copyright (c) 2017 by Renee Baecker.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install HTTP::Tiny::FileProtocol, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTTP::Tiny::FileProtocol
CPAN shell
perl -MCPAN -e shell install HTTP::Tiny::FileProtocol
For more information on module installation, please visit the detailed CPAN module installation guide.