Allow defining http response code

It would be useful for Web API/Pages if we could define which response code will be returned together with the response.