Commit b0d635b7 authored by Luc Didry's avatar Luc Didry

Add http(s) proxy options

parent 481f9bca
Makefile.old
Etherpad*.tar.gz
Revision history for Perl module Etherpad::API
1.2.10.0 Mon Fed 22 22:39:17 2015
1.2.10.1 Tue Fed 24 11:14:17 2015
- Add option for specifying http and https proxy
1.2.10.0 Sun Fed 22 22:39:17 2015
- Change version numbering method
- Update to API version 1.2.10 (1.5.1 version of Etherpad)
- Fix #101909 (https://rt.cpan.org/Public/Bug/Display.html?id=101909)
......
......@@ -18,8 +18,8 @@ DESCRIPTION
The Etherpad API currently supported is the 1.2.10 (Etherpad version:
1.5.1)
Please note that this module now uses the Etherpad version number for
versioning with a revision number (for bugfixes).
Please note that this module now uses the Etherpad API version number
for versioning with a revision number (for bugfixes).
USAGE
new
......@@ -30,7 +30,9 @@ USAGE
url : mandatory, the epl URL (trailing slashes will be removed)
apikey : mandatory, the epl API key
user : optional, the user for epl authentication
password : optional, the passowrd for epl authentication
password : optional, the password for epl authentication
proxy : optional, hash reference which can contain two keys: http and https.
These are the settings if you are behind a http(s) proxy
apikey
Usage : $ec->apikey();
......@@ -403,13 +405,12 @@ USAGE
See : http://etherpad.org/doc/v1.5.1/#index_listallpads
INSTALL
perl Makefile.PL
make
make test
make install
perl Makefile.PL
make
make test
make install
If you are on a windows box you should use 'nmake' rather than 'make'.
If you are on a windows box you should use 'nmake' rather than 'make'.
BUGS and SUPPORT
You can find documentation for this module with the perldoc command.
......
......@@ -9,7 +9,7 @@ use Carp qw(carp);
BEGIN {
use Exporter ();
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
$VERSION = '1.2.10.0';
$VERSION = '1.2.10.1';
@ISA = qw(Exporter);
#Give a hoot don't pollute, do not export more than needed by default
@EXPORT = qw();
......@@ -64,7 +64,9 @@ Please note that this module now uses the Etherpad API version number for versio
url : mandatory, the epl URL (trailing slashes will be removed)
apikey : mandatory, the epl API key
user : optional, the user for epl authentication
password : optional, the passowrd for epl authentication
password : optional, the password for epl authentication
proxy : optional, hash reference which can contain two keys: http and https.
These are the settings if you are behind a http(s) proxy
=cut
......@@ -81,6 +83,11 @@ sub new {
$parameters->{ua} = LWP::UserAgent->new;
if (defined($parameters->{proxy})) {
$parameters->{ua}->proxy('http', $parameters->{proxy}->{http}) if (defined($parameters->{proxy}->{http}));
$parameters->{ua}->proxy('https', $parameters->{proxy}->{https}) if (defined($parameters->{proxy}->{https}));
}
my $self = bless ($parameters, ref ($class) || $class);
return $self;
}
......@@ -2208,6 +2215,15 @@ sub list_all_pads {
#################### footer pod documentation begin ###################
=head1 INSTALL
perl Makefile.PL
make
make test
make install
If you are on a windows box you should use 'nmake' rather than 'make'.
=head1 BUGS and SUPPORT
You can find documentation for this module with the perldoc command.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment