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

NAME

PrankCall - call remote services and hang up without waiting for a response. A word of warning, this module should only be used for those who are comfortable with one way communication

SYNOPSIS

    use PrankCall user_agent => 'Hangup-Howey';

    my $prank = PrankCall->new(
        host => 'somewhere.beyond.the.sea',
        port => '10827',
    );

    $prank->get(
        path => '/',
        params => { 'bobby' => 'darin' },
        callback => sub {
          my ($prank, $error) = @_;
          $prank->redial;
        }
    );

    $prank->post(path => '/', body => { 'pizza' => 'hut' });

DESCRIPTION

Sometimes you just wanna call someone and hang up without waiting for them to say anything. PrankCall is your friend (but, oddly, also your nemesis)

METHODS

new( host => $str, [ port => $str] )

The constructor can take a number of parameters, being the usual host/port

get( path => $str, params => $hashref, [ request_obj => HTTP::Request, callback => $sub_ref ] )

Will perform a GET request, also accepts an optional HTTP::Request object and call back

post( path => $str, body => $hashref, [ request_obj => HTTP::Request, callback => sub_ref ] )

Will perform a POST request, also accepts an optional HTTP::Request object and call back

redial

Will perform a redial

AUTHOR

Logan Bell, with help from Belden Lyman

LICENSE

Copyright (c) 2013 Logan Bell and Shutterstock Inc (http://shutterstock.com). All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself