respondsWithStatus

Associates this stub with a body-free response carrying only an HTTP status code.

Example (Java):

mokksy.get(spec -> spec.path("/ping")).respondsWithStatus(204);

Return

A StubHandle for further inspection (e.g. StubHandle.matchCount).

Parameters

statusCode

The HTTP status code to return (e.g. 204, 404).