in reply to Need help with sending xml formatted payload using HTTP::Request

Try adding
$req->content_type('text/xml');
before $req->content(...

This should get you close to Your Mother's WWW::Mech-based implementation.

        "You're only given one little spark of madness. You mustn't lose it."         - Robin Williams

  • Comment on Re: Need help with sending xml formatted payload using HTTP::Request
  • Download Code

Replies are listed 'Best First'.
Re^2: Need help with sending xml formatted payload using HTTP::Request
by drohr (Acolyte) on Jan 21, 2015 at 14:05 UTC
    I have tried that, but I get the same error.
      Hmm .. try adding :
      $req->header('Accept' => 'application/xml');
      since, by default, apparently the accept list is empty, and altassian REST used by bamboo seems to require it.

              "You're only given one little spark of madness. You mustn't lose it."         - Robin Williams

        I gave that a try and it still didn't work.. I got the same error message: "The server refused this request because the request entity is in a format not supported by the requested resource for the requested method."