[Helma-user] Posting to URL
Julian Tree
julian.tree at gmail.com
Sat Sep 16 18:14:19 CEST 2006
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.js?
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://helma.org/pipermail/helma-user/attachments/20060916/2fb0088a/attachment-0001.html
More information about the Helma-user
mailing list