Make HTTP response object generic

This is now a generic object that can be shared across the REST and HTTP APIs.