Make contentType and contentLength properties

This commit is contained in:
Pierre-Olivier Latour
2014-04-03 15:23:33 -07:00
parent 467830e4de
commit 8116d88ec4
3 changed files with 23 additions and 24 deletions
+2 -3
View File
@@ -28,14 +28,13 @@
#import <Foundation/Foundation.h>
@interface GCDWebServerResponse : NSObject
@property(nonatomic, readonly) NSString* contentType;
@property(nonatomic, readonly) NSUInteger contentLength;
@property(nonatomic, copy) NSString* contentType; // Default is nil i.e. no body
@property(nonatomic) NSUInteger contentLength; // Default is NSNotFound i.e. undefined
@property(nonatomic) NSInteger statusCode; // Default is 200
@property(nonatomic) NSUInteger cacheControlMaxAge; // Default is 0 seconds i.e. "no-cache"
@property(nonatomic, readonly) NSDictionary* additionalHeaders;
+ (GCDWebServerResponse*) response;
- (id)init;
- (id)initWithContentType:(NSString*)type contentLength:(NSUInteger)length; // Pass nil contentType to indicate empty body
- (void)setValue:(NSString*)value forAdditionalHeader:(NSString*)header;
- (BOOL)hasBody; // Convenience method
@end