[Helma-user] Posting to URL
Julian Tree
julian.tree at gmail.com
Tue Sep 19 19:04:14 CEST 2006
ha that's funny stefan, I ended up using the the same thing. It is
much better documented than the ClientHttpRequest I found.
I did notice the jakarta's httpclient complains about not having the
commons-codec. However I think helma does have a commons-codec.jar in
the lib dir, but the httpclient seem to not reconginzed it.
But after downloading commons-codec-1.3.jar directly from jakarta, and
putting it in
lib/ext dir, everything works fine.
The client is very useful, glad to see that will be included in Helma
2. It seem to do something (especially multipart/form post) really
well, a feature seems to be lacking or patchy in php and RoR.
On 9/18/06, stefan.pollach at orf.at <stefan.pollach at orf.at> wrote:
> I'd suggest jakarta's httpclient:
> http://jakarta.apache.org/commons/httpclient/
> that does it all, including authentication, ssl, multipart post ....
>
> -Stefan
>
> > -----Original Message-----
> > From: helma-user-bounces at helma.org
> > [mailto:helma-user-bounces at helma.org] On Behalf Of Julian Tree
> > Sent: Saturday, September 16, 2006 6:14 PM
> > To: Helma User Mailing List
> > Subject: Re: [Helma-user] Posting to URL
> >
> > Hmm, I am actually looking for HTTP POST that will submit
> > multipart/form data with attached files. I may be wrong,
> > but it seems that helma.HTTP will only accept string objects
> > in the setContent. It will also require me to write my own
> > HTTP header, which something I am not to comfortable with.
> >
> > I actually found a java lib that will make very easy HTTP
> > Post request?
> >
> > http://www.devx.com/Java/Article/17679/1954?pf=true
> >
> > Making a multipart/form http post request is easy as
> >
> > InputStream serverInput = ClientHttpRequest.post(
> > new java.net.URL("hi.iq/register"),
> > new Object[] {
> > "name", "J.Doe",
> > "email",
> > "abuse at spamcop.com",
> > "test.txt", new
> > File("C:\home\vp\tmp\test.txt")
> > });
> >
> > Shall we integrate this into helma http? I would happy to
> > volunteer when I finish this project.
> >
> >
> >
> > On Sep 16, 2006, at 11:58 AM, <tobias.schaefer at orf.at>
> > <tobias.schaefer at orf.at> wrote:
> >
> >
> > julian
> >
> > doesn't helma.Http do what you're looking for?
> >
> >
> > http://adele.helma.org/source/viewcvs.cgi/modules/helma/Http.j
> > s?rev=1.2&content-type=text/vnd.viewcvs-markup
> >
> > t
> >
> >
> > -----Original Message-----
> > From: helma-user-bounces at helma.org on behalf of Julian Tree
> > Sent: Sat 16-Sep-06 01:04
> > To: Helma User Mailing List
> > Cc:
> > Subject: [Helma-user] Posting to URL
> >
> > I have searched the Mailing list for some way to make HTTP POST
> > request to another server, something like CURL. I
> > would like to POST
> > text as well as files.
> >
> > I found this
> > http://helma.org/pipermail/helma-user/2003-April/005189.html,
> >
> > but it looks like a dead end. I don't really know how
> > to write a
> > Helma extension using java, are there any available
> > examples? Thanks,
> >
> > Julian
> > _______________________________________________
> > Helma-user mailing list
> > Helma-user at helma.org
> > http://helma.org/mailman/listinfo/helma-user
> >
> >
> >
> >
> > <winmail.dat>
> > _______________________________________________
> > Helma-user mailing list
> > Helma-user at helma.org
> > http://helma.org/mailman/listinfo/helma-user
> >
> >
> > Julian Tree
> > Phone: (212) 202-0407
> >
> >
> >
> _______________________________________________
> Helma-user mailing list
> Helma-user at helma.org
> http://helma.org/mailman/listinfo/helma-user
>
More information about the Helma-user
mailing list