What i am trying to do is send xml data to a url that possesses a self signed cert.
use Win32::OLE; my $xml = 'some xml date not important to problem'; my $SendObject = Win32::OLE->new('WinHttp.WinHttpRequest.5.1'); #this is a problem...this is suppose to ignore error flags $SendObject->SetProperty('Option', 4); $SendObject->open("POST", "https://url", "false"); $SendObject->setRequestHeader("Content-type", "text/xml"); $SendObject->send($xml); my $response = $SendObject->responseText; if(Win32::OLE->LastError()){ print "\n\n".Win32::OLE->LastError()."\n\n"; }
the response i get is:
Win32::OLE(0.1502) error 0x8000000a: "The data necessary to complete this operation is not yet available" in METHOD/PROPERTYGET "responseText"

The response is coming back blank. I noticed in the OLE browser the following winhttprequestsslerrorflags and there is an ignoreall flag there but i do not know how to set it.

I need to be able to ignore the cert error message and process the request and get valid information back...any and all help is greatly appreciated. Thanks

*************UPDATE*****************
$SendObject->SetProperty('Option', 4, 0x3300);
this will ignore the flags apparently in release winHttp 5.1 by default ignore all flag means ignore none of them unless you set it to 0x3300

In reply to WinHttpRequest Trouble by bear0053

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.