Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sending xml content in body paragraph
#2
(2022-12-30, 11:48:19)Vasile Wrote: Hi,

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
Hi 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
Reply


Messages In This Thread
Sending xml content in body paragraph - by Vasile - 2022-12-30, 11:48:19
RE: Sending xml content in body paragraph - by wila - 2022-12-30, 12:37:27

Forum Jump:


Users browsing this thread: 1 Guest(s)