The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Test::Mock::HTTP::Tiny - Record and replay HTTP requests/responses with HTTP::Tiny

VERSION

version 0.002

SYNOPSIS

Capture HTTP data:

    use HTTP::Tiny;
    use Test::Mock::HTTP::Tiny;

    my $http = HTTP::Tiny->new;
    my $resp = $http->get('http://www.cpan.org/');

    print STDERR Test::Mock::HTTP::Tiny->captured_data_dump;

Replay captured data:

    Test::Mock::HTTP::Tiny->set_mocked_data([
        {
            url      => 'http://www.cpan.org/',
            method   => 'GET',
            args     => { ... },
            response => { ... },
        }
    ]);

    $resp = $http->get('http://www.cpan.org/');

DESCRIPTION

(TBA)

METHODS

mocked_data

set_mocked_data

append_mocked_data

clear_mocked_data

captured_data

captured_data_dump

clear_captured_data

SUPPORT

Bugs / Feature Requests

Please report any bugs or feature requests through the issue tracker at https://github.com/odyniec/p5-Test-Mock-HTTP-Tiny/issues. You will be notified automatically of any progress on your issue.

Source Code

This is open source software. The code repository is available for public review and contribution under the terms of the license.

https://github.com/odyniec/p5-Test-Mock-HTTP-Tiny

  git clone https://github.com/odyniec/p5-Test-Mock-HTTP-Tiny.git

AUTHOR

Michal Wojciechowski <odyniec@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by Michal Wojciechowski.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.