1Padre::Task::LWP(3) User Contributed Perl Documentation Padre::Task::LWP(3)
2
3
4
6 Padre::Task::LWP - Generic HTTP client background processing task
7
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
17 Sending and receiving data via HTTP.
18
20 new
21 my $task = Padre::Task::LWP->new(
22 request => HTTP::Request->new(
23 GET => 'http://perlide.org',
24 ),
25 );
26
27 The "new" constructor creates a Padre::Task for a background HTTP
28 request.
29
30 It takes a single addition parameter "request" which is a fully-
31 prepared HTTP::Request object for the request.
32
33 Returns a new Padre::Task::LWP object, or throws an exception on error.
34
35 request
36 The "request" method returns the HTTP::Request object that was provided
37 to the constructor.
38
39 response
40 Before the "run" method has been fired the "response" method returns
41 "undef".
42
43 After the "run" method has been fired the "response" method returns the
44 HTTP::Response object for the LWP::UserAgent request.
45
46 Typically, you would use this in the "finish" method for the task, if
47 you wish to take any further actions in Padre based on the result of
48 the HTTP call.
49
51 This class inherits from "Padre::Task" and its instances can be
52 scheduled using "Padre::TaskManager".
53
54 The transfer of the objects to and from the worker threads is
55 implemented with Storable.
56
58 Steffen Mueller "smueller@cpan.org"
59
61 Copyright 2008-2010 The Padre development team as listed in Padre.pm.
62
63 This program is free software; you can redistribute it and/or modify it
64 under the same terms as Perl 5 itself.
65
66
67
68perl v5.12.1 2010-06-11 Padre::Task::LWP(3)