Skip to content

How can I create an empty dummy HttpResponse

I am using org.apache.http.HttpResponse

I want to create an empty dummy resposne, I am going to use this to return when errors occur instead of passing back null.

I tried to create one and it has lost of weird params. Can someone tell me how to create one.

Answer

Just implement HttpResponse with no-op methods.