RouteResponse.h 755 B

1234567891011121314151617181920
  1. #import <Foundation/Foundation.h>
  2. #import "HTTPResponse.h"
  3. @class HTTPConnection;
  4. @class HTTPResponseProxy;
  5. @interface RouteResponse : NSObject
  6. @property (nonatomic, unsafe_unretained, readonly) HTTPConnection *connection;
  7. @property (nonatomic, readonly) NSDictionary *headers;
  8. @property (nonatomic, strong) NSObject<HTTPResponse> *response;
  9. @property (nonatomic, readonly) NSObject<HTTPResponse> *proxiedResponse;
  10. @property (nonatomic) NSInteger statusCode;
  11. - (id)initWithConnection:(HTTPConnection *)theConnection;
  12. - (void)setHeader:(NSString *)field value:(NSString *)value;
  13. - (void)respondWithString:(NSString *)string;
  14. - (void)respondWithString:(NSString *)string encoding:(NSStringEncoding)encoding;
  15. - (void)respondWithData:(NSData *)data;
  16. @end