Private
Public Access
1
0
Files
Kordophone/kordophone/Bridge/Operations/Utilities/MBIMDataResponse.m
2022-05-25 21:27:13 -07:00

37 lines
797 B
Objective-C

//
// MBIMDataResponse.m
// kordophoned
//
// Created by James Magahern on 11/20/18.
// Copyright © 2018 James Magahern. All rights reserved.
//
#import "MBIMDataResponse.h"
@implementation MBIMDataResponse {
NSString *_contentType;
NSMutableDictionary *_httpHeaders;
}
- (instancetype)initWithData:(NSData *)data contentType:(NSString *)contentType
{
self = [super initWithData:data];
if (self) {
_contentType = contentType;
_httpHeaders = [@{
@"Content-Type" : _contentType ?: @"application/octet-stream",
@"Access-Control-Allow-Origin" : @"*", // CORS
@"Access-Control-Allow-Credentials" : @"true"
} mutableCopy];
}
return self;
}
- (NSDictionary *)httpHeaders
{
return _httpHeaders;
}
@end