NAME
App::FonBot::Plugin::HTTPD - FonBot webserver plugin, used for communication with phones
SYNOPSIS
use App::FonBot::Plugin::HTTPD;
App::FonBot::Plugin::HTTPD->init;
...
App::FonBot::Plugin::HTTPD->fini;
DESCRIPTION
This FonBot plugin provides a webserver for interacting with fonbotd. All requests use Basic access authentication.
The available calls are:
- GET
/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.
- GET
/ok
-
Returns a 200 OK.
- POST
/send
-
Sends a message to an address. The address is given in the
X-Destination
header. The message is in the POST data. - GET
/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.
- POST
/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
CONFIGURATION VARIABLES
AUTHOR
Marius Gavrilescu marius@ieval.ro
COPYRIGHT AND LICENSE
Copyright 2013-2015 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/>