Private
Public Access
1
0
Files
Kordophone/kordophone/Bridge/Operations/Utilities/MBIMDataResponse.m

37 lines
797 B
Mathematica
Raw Normal View History

2018-11-21 01:38:43 -07:00
//
// 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;
2021-07-06 23:41:51 -07:00
NSMutableDictionary *_httpHeaders;
2018-11-21 01:38:43 -07:00
}
- (instancetype)initWithData:(NSData *)data contentType:(NSString *)contentType
{
self = [super initWithData:data];
if (self) {
_contentType = contentType;
2021-07-06 23:41:51 -07:00
_httpHeaders = [@{
2022-05-25 21:27:13 -07:00
@"Content-Type" : _contentType ?: @"application/octet-stream",
@"Access-Control-Allow-Origin" : @"*", // CORS
@"Access-Control-Allow-Credentials" : @"true"
2021-07-06 23:41:51 -07:00
} mutableCopy];
2018-11-21 01:38:43 -07:00
}
return self;
}
- (NSDictionary *)httpHeaders
{
2021-07-06 23:41:51 -07:00
return _httpHeaders;
2018-11-21 01:38:43 -07:00
}
@end