Post to URL and process reply via macro

Hi,

I know LibreOffice can GET or POST a form within Writer to a URL. The response from that URL is then displayed as an HTML reply (_blank, etc.).

I’d like to avoid opening the HTML reply and have it processed within a Basic macro I wrote. How can I do this? Which “event” should I link to my macro? How do I “read/process” the server’s reply (as string)? A simple example that shows the basics would be greatly appreciated.

Thanks but I already saw that post. I got basic socket handling working but it’s a bit odd that one should need to reinvent the wheel. I could make a socket connection and post data by eg. reading text field values (which incidentally I’m having trouble with) and sending them via POST then reading and parsing the reply. However, sending to an HTTPS server this way isn’t as simple as in the forum example. Also, why re-implement everything when both OO and LO can already send form data to a URL?

All I’d really need is a way to “intercept” the form submission reply with a macro. I tried all the “form macro events” but none triggered my macro… Also, even if I did find the right “event” and triggered my macro, I wouldn’t know how to access the server’s reply (as string/array of bytes).

This thread should cover request making and getting the response.

http://www.oooforum.org/forum/viewtopic.phtml?t=17645

For parsing HTML it very much depends on how complex stuff you want to parse out. If it is e.g only text inside

Your text
then simple text search will do just fine.