I need to send out a URL from an agent, running in the background without an open document. Is there any equivalent to URLOpen method in UIWorkSpace. If not, is there any way I can “print” the URL - I’m not expecting a response, I just need to broadcast it.
Thanks for all responses.
Subject: Options
If a user is running a web agent, you can use a Print statement to show the user anything you want, including a URL.
If a user is running a Notes agent, you can use a messagebox to display a URL.
If the agent is running on the server, have the agent send a message containing the URL.
Subject: RE: Options
Thanks, but that’s not quite what I want - I need the URL to actually be received by an external system - one that can extract info from the URL, because it cannot see into the server.
I want to “broadcast” the URL
Subject: RE: Options
The problem isn’t getting the URL out of Notes, it’s getting it into the other system. It’s simple enough to do a GetDocumentByURL against the foreign system, feeding the external URL in the Query_String as a GET request. You’ll get a response – all you need is a 200 to make the document fetch valid, you don’t actually have to do anything with it. If you use Java, you get a lot more control over the request. You could also mail or FTP the URL to the foreign system. It’s getting the other system to accept your data and do something with it that’s the challenge.
Subject: RE: Options
You could try invoking the XMLHTTPRequest object via COM and using that to send a POST to the other system.
This seems to work for instance:
Sub Initialize
Dim xh As Variant
Set xh = CreateObject("Microsoft.XMLHTTP")
Call xh.open("GET","http://www.google.com",True)
Call xh.send()
Print xh.status
Print xh.responseText
End Sub
Subject: Terrifc!!! thanks a lot.
Subject: RE: Options
Not sure I understand what you mean by GET request - how do I format the URL to include this.
Thanks.
Subject: RE: Options
A “GET” just means that any data you are passing will be in the URL – you know, like http://server.domain.tld/path/page?variable1=value1&variable2=value2. In this case it would be something like:
http://server.domain.tld/path/applicationpage?refer=otherserver.otherdomain.tld/path/page
The reason for using a GET is that LotusScript doesn’t do POST (including the data in the Request_Content), so if you want to do this server-side and don’t want to use Java, you can still send the data.