Closed abhikt48 closed 3 years ago
I got one alternative for this problem to use Action. It is working fine for me.
Recomendation - I must recommend you to provide one doReturn
override method which should accept status text as well.
Hi @abhikt48
You are right currently the only way to set statusText is by using "Action".
To make that easier I will extend the method withStatus
to accept reason
parameter.
So the full usage will look like that: httpClientMock.onPost("testUlr").doReturn("some message").withStatus(409,"reason");
Will be fixed in the scope of https://github.com/PawelAdamski/HttpClientMock/issues/33
Hi Team,
I need to return specific HTTP status message instead of default ok.
E.g - 1. 409 - Conflict
i tried wth below code snippet but is returning 'ok' instead of 'conflict' while calling
getStatusText()
operation,.httpClientMock.onPost("testUlr").doReturn(409, "some message");
Could you please suggest any way to set status text as well?