1Padre::Task::LWP(3)   User Contributed Perl Documentation  Padre::Task::LWP(3)
2
3
4

NAME

6       Padre::Task::LWP - Generic HTTP client background processing task
7

SYNOPSIS

9         # Fire and forget HTTP request
10         Padre::Task::LWP->new(
11             request => HTTP::Request->new(
12                 GET => 'http://perlide.org',
13             ),
14         )->schedule;
15

DESCRIPTION

17       Sending and receiving data via HTTP.
18

METHODS

20   new
21         my $task = Padre::Task::LWP->new(
22             method => 'GET',
23             url    => 'http://perlide.org',
24         );
25
26       The "new" constructor creates a Padre::Task for a background HTTP
27       request.
28
29       It takes a single addition parameter "request" which is a fully-
30       prepared HTTP::Request object for the request.
31
32       Returns a new Padre::Task::LWP object, or throws an exception on error.
33
34   request
35       The "request" method returns the HTTP::Request object that was provided
36       to the constructor.
37
38   response
39       Before the "run" method has been fired the "response" method returns
40       "undef".
41
42       After the "run" method has been fired the "response" method returns the
43       HTTP::Response object for the LWP::UserAgent request.
44
45       Typically, you would use this in the "finish" method for the task, if
46       you wish to take any further actions in Padre based on the result of
47       the HTTP call.
48

SEE ALSO

50       This class inherits from "Padre::Task" and its instances can be
51       scheduled using "Padre::TaskManager".
52
53       The transfer of the objects to and from the worker threads is
54       implemented with Storable.
55

AUTHOR

57       Steffen Mueller "smueller@cpan.org"
58
60       Copyright 2008-2011 The Padre development team as listed in Padre.pm.
61
62       This program is free software; you can redistribute it and/or modify it
63       under the same terms as Perl 5 itself.
64
65
66
67perl v5.28.1                      2011-08-16               Padre::Task::LWP(3)
Impressum