jliu5 has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I am trying to create a REST client to do a simple GET service at a https server, but got this error.
Here is my sample code, please advice.:
#! /usr/bin/env perl use REST::Client; use MIME::Base64; my $username = 'me'; my $password = 'me!!'; my $headers = {Accept => 'application/xml', Authorization => 'Basic ' +. encode_base64($username . ':' . $password)}; my $client = REST::Client->new(); $client->getUseragent->ssl_opts(verify_hostname => 0); $client->getUseragent->ssl_opts(SSL_verify_mode => SSL_VERIFY_NONE); $client->getUseragent->no_proxy('server_ip_string', 'server_ip_string' +); $client->GET("https://server_ip_string:port/upm-server/nbi/organizatio +n", $headers ); my $response = $client->responseContent(); print $response;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Error in HTTPS connection with error: No connection could be made because the target machine actively refused it. at C:/Perl/lib/LWP/Protocol/http.pm line 47 (ECONNREFUSED)
by tye (Sage) on Jul 26, 2016 at 16:16 UTC | |
|
Re: Error in HTTPS connection with error: No connection could be made because the target machine actively refused it. at C:/Perl/lib/LWP/Protocol/http.pm line 47
by stevieb (Canon) on Jul 26, 2016 at 16:08 UTC |