Groovy Http POST/GET Class

November 2nd, 2007

I was working on a project in Groovy and needed to do POST as well as read the response headers.

I was unable to find a suitable class or method for this in either Groovy or Java, so I wrote this class. It opens a socket to the requested host, and writes to the socket using getOutputStream() and PrintWriter(). It reads the response from the server using DataInputStream() and getInputStream().

You can download the full source here: GroovyHTTP.groovy

Share/Save/Bookmark

Tagged: , , ,

§ Leave a Reply

What's this?

You are currently reading Groovy Http POST/GET Class at Tony Landis.

meta