HTTP Post ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

HTTP Post ?

steve geringer-4
I have been using

inData := (IStream onURL:  urlString ) contents asString

to send a request and receive data from a webserver (a java servlet).

Apparently this uses a "GET" type http request.  Is there a
way to do "POST" http request?

The code I am interfacing to requires a POST, since the input I am
sending can be quite long.

For the interim I have coded up a JScript file to do the POST but I
don't want to ship the code this way.

(Searching this newgroup Archive I was not able to determine if this is
possible since http and post are both such common words. )

Thanks,
Steve


Reply | Threaded
Open this post in threaded view
|

Re: HTTP Post ?

rush
"steve geringer" <[hidden email]> wrote in message
news:wJT_e.15490$[hidden email]...
> Apparently this uses a "GET" type http request.  Is there a
> way to do "POST" http request?

Hello,

my advice would be to use Steve Waring's HTTPClient package, it does support
both GET and POST, and several other important things like cookie jar.

rush
----
http://www.templatetamer.com/
http://www.folderscavenger.com/


Reply | Threaded
Open this post in threaded view
|

Re: HTTP Post ?

steve geringer-4
Yes, I looked at that package, it looks like a full blown
http client riding on top of winsock.  Nice work.

Unfortunately, since it is open souce I can't use it.
My customer has strict requirements against incorporating
any open source in their commercial software package.


Has anyone had any experience with wrappering the
Microsoft.XMLHTTP COM Object (In order to do a POST)?


Thanks,
steve





rush wrote:

> "steve geringer" <[hidden email]> wrote in message
> news:wJT_e.15490$[hidden email]...
>
>>Apparently this uses a "GET" type http request.  Is there a
>>way to do "POST" http request?
>
>
> Hello,
>
> my advice would be to use Steve Waring's HTTPClient package, it does support
> both GET and POST, and several other important things like cookie jar.
>
> rush
> ----
> http://www.templatetamer.com/
> http://www.folderscavenger.com/
>
>


Reply | Threaded
Open this post in threaded view
|

Re: HTTP Post ?

Dmitry Zamotkin-5
IXMLHttpRequest>>#open:bstrUrl:varAsync:bstrUser:bstrPassword: ???


Reply | Threaded
Open this post in threaded view
|

Re: HTTP Post ?

steve geringer-4
[hidden email] wrote:
> IXMLHttpRequest>>#open:bstrUrl:varAsync:bstrUser:bstrPassword: ???
>



Thanks dz... I'll take a look at it.


Reply | Threaded
Open this post in threaded view
|

Re: HTTP Post ?

Don Rylander-3
Steve,
"steve geringer" <[hidden email]> wrote in message
news:j4c%e.77151$[hidden email]...
> [hidden email] wrote:
>> IXMLHttpRequest>>#open:bstrUrl:varAsync:bstrUser:bstrPassword: ???

This has worked well for us.  It not only let you specify GET or PUT, but it
also deals with firewalls more gracefully.  Here are a couple of trivial
(but useful to me) helper methods.  They might help in your investigations,
if you're not beyond them already:

open: methodString url: url
 "helper method"

 ^self
  open: methodString
  bstrUrl: url
  varAsync: VARIANT unspecified
  bstrUser: VARIANT unspecified
  bstrPassword: VARIANT unspecified

open: methodString url: url async: aBoolean
 "helper method"

 ^self
  open: methodString
  bstrUrl: url
  varAsync: aBoolean
  bstrUser: VARIANT unspecified
  bstrPassword: VARIANT unspecified

HTH,

Don


>>
>
>
>
> Thanks dz... I'll take a look at it.
>