Padre::Task::LWP(3pm)

Padre::Task::LWP3pm

Generic http client background processing task

Usage

  # Fire and forget HTTP request
  Padre::Task::LWP->new(
      request => HTTP::Request->new(
          GET => 'http://perlide.org',
      ),
  )->schedule;

Overview

Sending and receiving data via HTTP.

Methods

new

  my $task = Padre::Task::LWP->new(
      method => 'GET',
      url    => 'http://perlide.org',
  );

The "new" constructor creates a Padre::Task for a background HTTP request.

It takes a single addition parameter "request" which is a fully-prepared HTTP::Request object for the request.

Returns a new Padre::Task::LWP object, or throws an exception on error.

request

The "request" method returns the HTTP::Request object that was provided to the constructor.

response

Before the "run" method has been fired the "response" method returns "undef".

After the "run" method has been fired the "response" method returns the HTTP::Response object for the LWP::UserAgent request.

Typically, you would use this in the "finish" method for the task, if you wish to take any further actions in Padre based on the result of the HTTP call.

Releases

3 releases since Debian 6.0 (Squeeze); the text changed 2 times.

  1. 6.0
  2. 7
  3. 8

Author

Steffen Mueller "[email protected]"

From padre 1.00+dfsg-3 in Debian 8 (Jessie). Parsed by carta from the page's man source.