Has the Treasury Direct interface changed?

farleykj farleykj at gmail.com
Thu Dec 28 16:56:56 EST 2017


Sorry, I thought I'd responded to the message about telling the agent what
browser it is identifying itself as.
I'm using Perl, and the code I'm using to see what's up is as follows:

<BEGIN CODE>
use LWP::UserAgent ;
use LWP::Simple ;

my $urlSite  = "https://www.treasurydirect.gov/BC/SBCPrice" ;
my $idBrowser = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:57.0)
Gecko/20100101 Firefox/57.0" ;

my $userAgent = LWP::UserAgent->new ;
$userAgent->agent ( $idBrowser ) ;

my $resData = $userAgent->get ( $urlSite ) ;
print "--- [ CONTENT ] --- \n" ;
print $resData->content . "\n" ;
print "--- [ CONTENT ] --- \n" ;
<END CODE>

The output I get from this is as follows:

--- [ CONTENT ] --- 
Can't connect to www.treasurydirect.gov:443 (Connection refused)

LWP::Protocol::https::Socket: connect: Connection refused at
/Library/Perl/5.18/LWP/Protocol/http.pm line 49.

--- [ CONTENT ] --- 

It's not like I'm some expert in Perl, but I have been using the module I
wrote for a couple of years. It was working fine until somewhere around the
middle of this month, then suddenly failed. Attempting to debug things shows
that even the simplest attempts to communicate with the site don't get me
anything but the above error message.



-----
Ken Farley
--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html


More information about the gnucash-user mailing list