in reply to Rest API testing with perl
The return code 500 doesn't mean that there's a problem with the connection, but rather that your request triggered an internal error in the web application you're testing.
So look at that web application's error log, it should give you more clues about what's going wrong.
In Section
Seekers of Perl Wisdom