API-Plesk

 view release on metacpan or  search on metacpan

lib/API/Plesk.pm  view on Meta::CPAN

    );
}

sub bulk_send { confess "Not implemented!" }

# Send xml request to plesk api
sub xml_http_req {
    my ($self, $xml) = @_;

    # HTTP::Request undestends only bytes
    utf8::encode($xml) if utf8::is_utf8($xml);

    my $ua = new LWP::UserAgent( parse_head => 0 );
    my $req = new HTTP::Request POST => $self->{url};

    if ($self->{secret_key}) {
        $req->push_header(':KEY',  $self->{secret_key});
    } else {
        $req->push_header(':HTTP_AUTH_LOGIN',  $self->{username});
        $req->push_header(':HTTP_AUTH_PASSWD', $self->{password});
    }

t/TestData.pm  view on Meta::CPAN


    return $result_hash;
}


sub check_input_data {
    my $params = shift;
    my $plesk_client = shift;

    my $general_info = {
        pname   => $params->{pname},  # utf8 string 
        login   => $params->{login},
        passwd  => $params->{passwd},
        phone   => $params->{phone},
        email   => $params->{email},
        country => $params->{country}, # optional field
    };
    

    my $result_add_by_id = $plesk_client->Accounts->create( 
        general_info    => $general_info,



( run in 0.531 second using v1.01-cache-2.11-cpan-49f99fa48dc )