Forum Discussion

MK2's avatar
Occasional Visitor
3 years ago

No Content-Type for POST Response


I am trying to send a POST Response with the REST Mock Service but without any Content and Content-Type.

The Response only have to give the Http Status Code 201 back.

If I clear the content of the "Content | Media Type" Field, then this field remains empty but existent.

I tested with "mockResponse.setContentType(null)" but then I'll get this Error:

"ERROR:com.eviware.soapui.impl.wsdl.mock.DispatchException: com.eviware.soapui.impl.wsdl.mock.DispatchException: java.lang.Exception: Cannot invoke "String.split(String)" because "contentType" is null"

So is there any way to delete the Header "Content-Type" and "Content-Length" with a script from the response?

No RepliesBe the first to reply