mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-31 11:02:44 +00:00
Monotone-Parent: e94c8ae67d2887b188febc57c064c3e5be325bc9
Monotone-Revision: 3a52f24d5383740ac373578b476831142dd2d359 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-12-13T19:25:01 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#import <NGExtensions/NSURL+misc.h>
|
||||
|
||||
#import <SoObjects/SOGo/NSCalendarDate+SOGo.h>
|
||||
#import <SoObjects/SOGo/NSObject+Utilities.h>
|
||||
#import <SoObjects/SOGo/NSString+Utilities.h>
|
||||
#import <SoObjects/SOGo/SOGoUser.h>
|
||||
#import <SoObjects/SOGo/SOGoObject.h>
|
||||
@@ -584,12 +585,45 @@ static BOOL uixDebugEnabled = NO;
|
||||
return url;
|
||||
}
|
||||
|
||||
- (WOResponse *) responseWith204
|
||||
- (WOResponse *) responseWithStatus: (unsigned int) status
|
||||
{
|
||||
WOResponse *response;
|
||||
|
||||
response = [context response];
|
||||
[response setStatus: 204];
|
||||
[response setStatus: status];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
- (WOResponse *) responseWithStatus: (unsigned int) status
|
||||
andString: (NSString *) contentString
|
||||
{
|
||||
WOResponse *response;
|
||||
|
||||
response = [self responseWithStatus: status];
|
||||
[response appendContentString: contentString];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
- (WOResponse *) responseWithStatus: (unsigned int) status
|
||||
andJSONRepresentation: (NSObject *) contentObject;
|
||||
{
|
||||
return [self responseWithStatus: status
|
||||
andString: [contentObject jsonRepresentation]];
|
||||
}
|
||||
|
||||
- (WOResponse *) responseWith204
|
||||
{
|
||||
return [self responseWithStatus: 204];
|
||||
}
|
||||
|
||||
- (WOResponse *) redirectToLocation: (NSString *) newLocation
|
||||
{
|
||||
WOResponse *response;
|
||||
|
||||
response = [self responseWithStatus: 302];
|
||||
[response setHeader: newLocation forKey: @"location"];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user