Campoie / rest-assured

Automatically exported from code.google.com/p/rest-assured
0 stars 0 forks source link

Add support for body in DELETE #48

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Delete should support body content

Original issue reported on code.google.com by johan.ha...@gmail.com on 23 Mar 2011 at 3:53

GoogleCodeExporter commented 9 years ago
Not supported by HTTPBuilder

java.lang.IllegalArgumentException: Cannot set a request body for a DELETE 
method
    at groovyx.net.http.HTTPBuilder$RequestConfigDelegate.setBody(HTTPBuilder.java:1144)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:2395)
    at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:3315)
    at org.codehaus.groovy.runtime.InvokerHelper.setProperty(InvokerHelper.java:183)
    at groovy.lang.Closure.setPropertyTryThese(Closure.java:251)
    at groovy.lang.Closure.setPropertyDelegateFirst(Closure.java:241)
    at groovy.lang.Closure.setProperty(Closure.java:222)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setGroovyObjectProperty(ScriptBytecodeAdapter.java:531)

Original comment by johan.ha...@gmail.com on 1 Apr 2011 at 10:21

GoogleCodeExporter commented 9 years ago
This is really missing. Would be good to get it fixed in HTTPBuilder or have 
some workaround.

Original comment by rus...@gmail.com on 16 Jul 2011 at 11:11

GoogleCodeExporter commented 9 years ago
Taking into account that dependency on HTTPBuilder is now gone, can we reopen 
this ticket?

Most modern REST APIs support batch DELETE operations where body content 
required.

Original comment by rus...@gmail.com on 2 May 2012 at 11:43

GoogleCodeExporter commented 9 years ago
What do you mean by batch DELETE operations? It should be possible to specify a 
request body for the DELETE method as of version 1.6. It's not supported for 
multi-part file data uploading but to me it seems awkward to use a DELETE 
method for that. Correct me if I'm wrong.

Original comment by johan.ha...@gmail.com on 3 May 2012 at 6:01

GoogleCodeExporter commented 9 years ago
Should have tested first. Works perfectly in 1.6.1. Thanks!

Original comment by rus...@gmail.com on 3 May 2012 at 12:24