Forum at OOoForum.orgThe Forum
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Syntax for "POST" Command?

Post new topic   Reply to topic Forum Index -> Macros and API
View previous topic :: View next topic  
Author Message
General User
General User

Joined: 08 Mar 2011
Posts: 16
Location: Buena Park, CA, USA

PostPosted: Thu May 12, 2011 8:55 pm    Post subject: Syntax for "POST" Command? Reply with quote

I have a number of web sites I need to query for data, some of which use the "POST" Submit Method in their forms. I have string variables with the appropriate post input. I also stumbled upon the PostCommandArgument struct ( that seems to do exactly what I need to do... put the string variable into a TextInputStream (Source parameter), fire it off to the server, and pour the reply into a data sink (Sink parameter). However, when I set it all up and try to execute it, I get the following error:
BASIC runtime error.
An exception occurred
Message: Wront argument type!.

Here is the relevant code:
'*****  Set Up Post Command Arguments  *****
  Dim oPC as new
  oPC.Source = oOutStream
  oPC.Sink = oInStream

'*****  Now, Try the POST Command  *****
  Dim aCommand as New
  aCommand.Name = "post"
  aCommand.Handle = -1
  aCommand.Argument = oPC

  oQC.Execute(aCommand, 0, oXCE)

I have the Universal Content Broker set up, along with a command environment and the appropriate handlers.

The code that I've used, successfully, to catch replies from web servers (that, properly, used the GET submission method) doesn't work in this instance. Here's the snippet of that code:
'Now, move returned page into a string variable.
  Dim oInputText as Object
  Dim sFileText as String
  Dim DummyArray(0) : DummyArray(0) = ""
  oInputText = createUNOService ("")
  sFileText = oInputText.readString(DummyArray(), FALSE)

Does anybody know what I'm doing wrong? It's probably some bone-headed syntactic error like leaving out a comma, or some such, but I'm at my wit's end.

Thanks in advance! Smile

Fair day and be well,
Adam-Zad, The Bear That Looks Like A Man
Back to top
View user's profile Send private message
OOo Enthusiast
OOo Enthusiast

Joined: 22 Jun 2004
Posts: 142

PostPosted: Thu May 26, 2011 3:24 am    Post subject: Reply with quote


have a look here :

POST needs aparantly other arguments Mimetype and a URL

please post more code so i also can run some tests


Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic Forum Index -> Macros and API All times are GMT - 8 Hours
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group