mirror of
https://github.com/swisspol/GCDWebServer.git
synced 2026-04-24 00:00:04 +08:00
Make contentType and contentLength properties
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user