File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant task for HTTP POST? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Ant task for HTTP POST?" Watch "Ant task for HTTP POST?" New topic

Ant task for HTTP POST?

Jonathan Dodds

Joined: Jul 27, 2005
Posts: 2
Is there an Ant task that can perform an HTTP POST request?

The Get task will perform an HTTP GET but is there a way to POST?

Carol Enderlin
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
I haven't used it, but after a few google searches I found Post task in antelope

Google result on "http post" got a hit on the
Ant related projects page
Jonathan Dodds

Joined: Jul 27, 2005
Posts: 2

The versions of the post task in antelope and ant-contrib don't appear to meet my needs though. I need to POST an XML request and I need support for Basic Auth.
[ March 30, 2006: Message edited by: Jonathan Dodds ]
Alex Sherwin

Joined: Mar 15, 2011
Posts: 1
have created an Apache 2.0 licensed, full featured and easy to use ant http task. It utilizes core* classes and has no third party library dependencies.

It can do POST/PUT with files or in-line entities, and has flexible options for setting required headers, authentication and status code checking for build failure on unexpected results.
I agree. Here's the link:
subject: Ant task for HTTP POST?
jQuery in Action, 3rd edition