The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

App::SpamcupNG::UserAgent - the SpamcupNG HTTP user agent

SYNOPSIS

DESCRIPTION

This class is responsible to interact with the Spamcop website, providing requests and returning the HTML responses.

METHODS

new

Creates a new instance.

Expects as parameter:

- version: a string of the version of SpamcupNG.

Returns a new instance.

user_agent

Returns a string with the HTTP header user-agent that will be used by the inner HTTP user agent.

login

Execute the login to Spamcop website.

If form based authentication is in use, it will login just once and return the response of HTTP GET to Spamcop root URL.

Expect as parameters:

  • id: the ID of a Spamcop account.

  • password: the password of a Spamcop account.

Returns the HTTP response (HTML content) as a scalar reference.

spam_report

Fetches a SPAM report.

Expects as parameter a report ID.

Returns the HTML content as a scalar reference.

base

Returns the current base URL provided by the last response of getting a SPAM report.

complete_report

Complete the SPAM report, by confirming it's information is OK.

Returns the HTML content as a scalar reference.

AUTHOR

Alceu Rodrigues de Freitas Junior, <glasswalk3r@yahoo.com.br>

COPYRIGHT AND LICENSE

This software is copyright (c) 2018 of Alceu Rodrigues de Freitas Junior, <glasswalk3r@yahoo.com.br>

This file is part of App-SpamcupNG distribution.

App-SpamcupNG is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

App-SpamcupNG is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with App-SpamcupNG. If not, see <http://www.gnu.org/licenses/>.