Is this code running in a CGI application? If so, the error may be caused by the fact that you are trying to write to a file that you can't write to. If not, the 500 series codes refer to server errors - this may indicate problems on the remote server. Can you post the parameters manually?

Also, you might try using URI::Escape(uri_escape) to escape your query string. There may be characters in there that are causing problems with the post.

One thing that I usually do when running into LWP is use Data::Dumper and print out the UserAgent object ($ua). This shows the contents of the header, the retrieved document, the return code and other useful information. That might help you track down the problem.


«Rich36»

In reply to Re: How do you find out if your HTTP response succeeded via LWP? by Rich36
in thread How do you find out if your HTTP response succeeded via LWP? by kleinbiker7

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.