App::FonBot::Plugin::HTTPD - FonBot webserver plugin, used for communication with phones
use App::FonBot::Plugin::HTTPD; App::FonBot::Plugin::HTTPD->init; ... App::FonBot::Plugin::HTTPD->fini;
This FonBot plugin provides a webserver for interacting with fonbotd. All requests use Basic access authentication.
The available calls are:
/get
Returns a JSON array of pending commands for the current user. Uses long polling — the server does not respond immediately if there are no pending commands.
/ok
Returns a 200 OK.
/send
Sends a message to an address. The address is given in the X-Destination header. The message is in the POST data.
X-Destination
/userget
Returns a JSON array of pending messages for the current user. Uses long polling — the server does not respond immediately if there are no pending commands.
/usersend
Sends a command to the sender's phone. The optional X-Requestid header sets the request ID. The command is in the POST data
X-Requestid
$httpd_port
The HTTPD listens on this port.
Marius Gavrilescu marius@ieval.ro
marius@ieval.ro
Copyright 2013 Marius Gavrilescu
This file is part of fonbotd.
fonbotd is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
fonbotd 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with fonbotd. If not, see <http://www.gnu.org/licenses/>
To install App::FonBot::Daemon, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::FonBot::Daemon
CPAN shell
perl -MCPAN -e shell install App::FonBot::Daemon
For more information on module installation, please visit the detailed CPAN module installation guide.