Forum Discussion

MK2's avatar
MK2
Occasional Visitor
2 years ago

No Content-Type for POST Response

Hi,

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