Posting the form on
http://www.snee.com/xml/crud/posttest.html with the http-builder package would look something like this:
@Grab( 'org.codehaus.groovy.modules.http-builder:http-builder:0.5.0-RC2' )
import groovyx.net.http.HTTPBuilder
import static groovyx.net.http.ContentType.URLENC
def http = new HTTPBuilder( 'http://www.snee.com/xml/crud/' )
http.post( path:'posttest.cgi',
body:[ fname:'Tim' , lname:'Yates' ],
requestContentType:URLENC ) { resp, reader ->
println "Response status: ${resp.statusLine}"
System.out << reader
}
That posts the 2 fields on that page, then prints the results
Not used http-builder before though, so there may be a neater way of doing it :-)
Tim