Switches from GCDWebServer to CocoaHTTPServer so we can have HTTPS eventually
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// MBIMJSONDataResponse.m
|
||||
// kordophoned
|
||||
//
|
||||
// Created by James Magahern on 11/16/18.
|
||||
// Copyright © 2018 James Magahern. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MBIMJSONDataResponse.h"
|
||||
|
||||
@implementation MBIMJSONDataResponse
|
||||
|
||||
+ (instancetype)responseWithJSONObject:(id)object
|
||||
{
|
||||
NSData *data = [NSJSONSerialization dataWithJSONObject:object options:0 error:NULL];
|
||||
if (data == nil) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
MBIMJSONDataResponse *response = [[self alloc] initWithData:data];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
- (NSDictionary *)httpHeaders
|
||||
{
|
||||
return @{
|
||||
@"Content-Type" : @"application/json; charset=utf-8"
|
||||
};
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user