PeterRigole
unread,Sep 1, 2011, 9:32:12 AM9/1/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to REST assured
Hi,
I consistently have problems sending JSON data along with post or put
messages. Even the textbook example fails:
given().content("{ \"message\" : \"hello world
\"}").then().expect().statusCode(200).when().post("/json");
The exception is:
groovy.lang.MissingMethodException: No signature of method:
java.lang.String.call() is applicable for argument types:
(java.lang.String) values: [{ "message" : "hello world"}]
Possible solutions: wait(), any(), wait(long),
split(java.lang.String), any(groovy.lang.Closure),
each(groovy.lang.Closure)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:
54)
at
org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:
46)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:
40)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
116)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
124)
at
com.jayway.restassured.internal.RequestSpecificationImpl.content(RequestSpecificationImpl.groovy:
389)
Any ideas? I'm using RESTassured 1.2.3.
Best regards,
Peter