Thanks for the Reply Thom,
Ok so I believe I figured out what to do, the post convenience method seems to show me how to wire in a custom HTTP method. I'm guessing in the below code I just need to create a different HTTP method and follow the same process to setup the delegate and call doRequest.
I have one question, why is the groovyx.net.http.Method class marked private final? It seemed like this would be much easier if I could just extend that class and modify the Enum to include my custom http methods.
FYI I'm not a java programmer so I may be completely off base with my above comment.
Thank you for your help,
Robert
public Object post( Map<String,?> args, Closure responseClosure )
throws URISyntaxException, ClientProtocolException, IOException {
RequestConfigDelegate delegate = new RequestConfigDelegate(
new HttpPost(), this.defaultContentType,
this.defaultRequestHeaders,
this.defaultResponseHandlers );
/* by default assume the request body will be URLEncoded, but allow
the 'requestContentType' named argument to override this if it is
given */
delegate.setRequestContentType( ContentType.URLENC.toString() );
delegate.setPropertiesFromMap( args );
if ( responseClosure != null ) delegate.getResponse().put(
Status.SUCCESS.toString(), responseClosure );
return this.doRequest( delegate );