[Melbourne-pm] LWP not giving the expected response

Mithun Radhakrishnan mithunr2003 at gmail.com
Sat Feb 22 01:59:48 PST 2014


Thanks Dave.

That was super cool.. I spent almost a day for finding the solution to
this. :)

Regards
Mithun


On Sat, Feb 22, 2014 at 3:06 PM, David Dick <ddick at iinet.net.au> wrote:

> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/melbourne-pm/attachments/20140222/e60fe45b/attachment.html>


More information about the Melbourne-pm mailing list