Remove unused code
Standardize mock request api
Generate content that is not chunked encoded when we know the response size.
Use response encoding when generating a failsafe response