View on
MetaCPAN
Renée Bäcker > HTTP-Tiny-FileProtocol-0.04 > HTTP::Tiny::FileProtocol

Download:
HTTP-Tiny-FileProtocol-0.04.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.04   Source   Latest Release: HTTP-Tiny-FileProtocol-0.05

NAME ^

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

VERSION ^

version 0.04

SYNOPSIS ^

    use HTTP::Tiny;
    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)
syntax highlighting: