Skip to content
Advertisement

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.

Advertisement

Answer

Just implement HttpResponse with no-op methods.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement