diff options
Diffstat (limited to 'platform/ios/uitest/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse+JSON.m')
m--------- | platform/ios/uitest/OHHTTPStubs | 0 | ||||
-rw-r--r-- | platform/ios/uitest/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse+JSON.m | 31 |
2 files changed, 0 insertions, 31 deletions
diff --git a/platform/ios/uitest/OHHTTPStubs b/platform/ios/uitest/OHHTTPStubs new file mode 160000 +Subproject deed01a1592210a4c37f3f5c5f2b32fe0e41c60 diff --git a/platform/ios/uitest/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse+JSON.m b/platform/ios/uitest/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse+JSON.m deleted file mode 100644 index aebcb99080..0000000000 --- a/platform/ios/uitest/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse+JSON.m +++ /dev/null @@ -1,31 +0,0 @@ -// -// OHHTTPStubsResponse+JSON.m -// OHHTTPStubs -// -// Created by Olivier Halligon on 01/09/13. -// Copyright (c) 2013 AliSoftware. All rights reserved. -// - -#import "OHHTTPStubsResponse+JSON.h" - -@implementation OHHTTPStubsResponse (JSON) - -/*! @name Building a response from JSON objects */ - -+ (instancetype)responseWithJSONObject:(id)jsonObject - statusCode:(int)statusCode - headers:(NSDictionary *)httpHeaders -{ - if (!httpHeaders[@"Content-Type"]) - { - NSMutableDictionary* mutableHeaders = [NSMutableDictionary dictionaryWithDictionary:httpHeaders]; - mutableHeaders[@"Content-Type"] = @"application/json"; - httpHeaders = [NSDictionary dictionaryWithDictionary:mutableHeaders]; // make immutable again - } - - return [self responseWithData:[NSJSONSerialization dataWithJSONObject:jsonObject options:0 error:nil] - statusCode:statusCode - headers:httpHeaders]; -} - -@end |