2022-12-30, 12:37:27
(2022-12-30, 11:48:19)Vasile Wrote: Hi,Hi Vasile,
I need to send the content of an xml file in the body part of a message, using the POST method.
The requirement is to specify Content-Type=application/xml in the header part.
Question: Can this be done with the method:
.NavigateWithWebResourceRequest(String uri, String method, String postData, String headers)
or
.PostWebMessageAsString(String webMessageAsString)
A small example would help.
Thanks you,
Vasile
Normally I would use the http post feature in the programming language that I am using in order to do such a thing, but there might be numerous reasons why you can't do that.
With that out of the way.
You cannot use PostWebMessageAsString for that as webmessages are something for communicating between host application and html/javascript hosted in the browser control.
See for example here: https://developer.mozilla.org/en-US/docs...ostMessage
for more info on that and a code example with AntView is here: https://doc.antview.dev/hs850.htm
NavigateWithWebResourceRequest could work for this.
Sadly the online help on this is behind, but you've got a private version of AntView where the help is updated.
Look in the CHM file that is installed with AntView and look up NavigateWithWebResourceRequest.
I think it has all the info you need to get this working.
If not then do let me know.
--
Wil