[Melbourne-pm] LWP not giving the expected response
David Dick
ddick at iinet.net.au
Sat Feb 22 01:36:32 PST 2014
On 02/22/2014 08:22 PM, Mithun Radhakrishnan wrote:
>
> Hi Mongers,
>
> I am not getting the proper response from the below URL when used with
> LWP request. However curl gives proper response. Do I need to add any
> thing extra in the code. The same perl code works perfectly with other
> URLs.
>
> http://cgjobjarservice-axzz2sbpnu.elasticbeanstalk.com/service/getLookupData/category
your perl code would work fine for most sites. This particular site
seems to blow up unless you add the following line to your code.
$ua->default_header('Accept' => '*/*');
Some websites behave oddly. Some more so.
Dave
More information about the Melbourne-pm
mailing list