All you have to do is return the HTTPDataResponse to your HTTPConnection subclass.
If you need an example, look at the CocoaHTTPServer example called DynamicServer and replace - httpResponseForMethod: URI: in MyHTTPConnection with something similar to the following:
- (NSObject<HTTPResponse> *)httpResponseForMethod:(NSString *)method URI:(NSString *)path {
source share