Added support for the getCode method so 404 headers can be sent when necessary