Most esteemed monks,
I have a script pulling back CMDB info from service now using REST API. works a treat on my windows laptop where developed. Move it to Linux and I get a 400 back. I have cut things all the way back and found it is not REST issue, but even a basic LWP get is failing. Here is my test script that work on win, fails on lin.
Here is the curl test#!/usr/bin/perl use strict; use warnings; use LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->proxy('https', $ENV{HTTPS_PROXY}); my $response = $ua->get('https://google.com/'); if ($response->is_success) { print $response->decoded_content; # or whatever } else { die $response->status_line; }
My HTTPS_PROXY is set, and I can pull back https://google.com with curl. What magic do I miss?myaccount@linuxhost:~> curl https://www.google.com <HTML><HEAD><meta http-equiv="content-type" content="text/html;charset +=utf-8"> <TITLE>302 Moved</TITLE></HEAD><BODY> <H1>302 Moved</H1> The document has moved <A HREF="https://www.google.se/?gfe_rd=cr&ei=XwaLWMjfB6Sr8weh06_QD +Q">here</A>. </BODY></HTML>
Cheers,
R.
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |