DAPNET-API

 view release on metacpan or  search on metacpan

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

};

sub _build_request {
    my($self) = shift;
    my($json) = shift;
    my($type) = shift;
    my($username) = $self->{DAPNET_USERNAME};
    my($pw) = $self->{DAPNET_PW};
    my($uri) = 'http://www.hampager.de:8080/'.$type;
    print("Building HTTP request\n") if($self->{DEBUG});
    my($req) = HTTP::Request->new(
                POST => $uri
	             );
    $req->header(   'Content-Type' => 'application/json',
                    'Authorization'=>'Basic ' . encode_base64($username.':'.$pw)
            );
	
    $req->content( $json );
    return($req);
    
};



( run in 0.317 second using v1.01-cache-2.11-cpan-de7293f3b23 )