Merge branch 'feature/global_headers' into 'release/7_7_0'
global headers See merge request BPHV_MIPS/mvm_core!83
This commit is contained in:
commit
db7e37f894
@ -35,6 +35,8 @@
|
|||||||
|
|
||||||
#pragma mark - Request Functions.
|
#pragma mark - Request Functions.
|
||||||
|
|
||||||
|
- (void)setHeadersForRequest:(nonnull NSMutableURLRequest *)request requestParameters:(nonnull MVMCoreRequestParameters *)requestParameters;
|
||||||
|
|
||||||
// Creates a request object with the given parameters.
|
// Creates a request object with the given parameters.
|
||||||
- (nullable NSURLRequest *)requestWithParameters:(nonnull MVMCoreRequestParameters *)requestParameters error:(MVMCoreErrorObject *_Nonnull *_Nonnull)error;
|
- (nullable NSURLRequest *)requestWithParameters:(nonnull MVMCoreRequestParameters *)requestParameters error:(MVMCoreErrorObject *_Nonnull *_Nonnull)error;
|
||||||
|
|
||||||
|
|||||||
@ -35,15 +35,7 @@
|
|||||||
@implementation MVMCoreLoadHandler
|
@implementation MVMCoreLoadHandler
|
||||||
|
|
||||||
+ (nullable instancetype)sharedGlobal {
|
+ (nullable instancetype)sharedGlobal {
|
||||||
static dispatch_once_t once;
|
return [MVMCoreActionUtility initializerClassCheck:[MVMCoreObject sharedInstance].loadHandler classToVerify:self];
|
||||||
static id sharedInstance;
|
|
||||||
|
|
||||||
dispatch_once(&once, ^
|
|
||||||
{
|
|
||||||
sharedInstance = [[self alloc] init];
|
|
||||||
});
|
|
||||||
|
|
||||||
return sharedInstance;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype)init {
|
- (instancetype)init {
|
||||||
@ -234,7 +226,7 @@
|
|||||||
return boundary;
|
return boundary;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setHeadersForRequest:(NSMutableURLRequest *)request requestParameters:(MVMCoreRequestParameters *)requestParameters {
|
- (void)setHeadersForRequest:(nonnull NSMutableURLRequest *)request requestParameters:(nonnull MVMCoreRequestParameters *)requestParameters {
|
||||||
|
|
||||||
[request setHTTPMethod:@"POST"];
|
[request setHTTPMethod:@"POST"];
|
||||||
[request setValue:@"no-cache, no-store" forHTTPHeaderField:@"Cache-Control"];
|
[request setValue:@"no-cache, no-store" forHTTPHeaderField:@"Cache-Control"];
|
||||||
|
|||||||
@ -17,6 +17,7 @@
|
|||||||
#import <MVMCore/MVMCoreLoggingDelegateProtocol.h>
|
#import <MVMCore/MVMCoreLoggingDelegateProtocol.h>
|
||||||
#import <MVMCore/MVMCoreGlobalTopAlertDelegateProtocol.h>
|
#import <MVMCore/MVMCoreGlobalTopAlertDelegateProtocol.h>
|
||||||
#import <MVMCore/MVMCoreLoggingHandler.h>
|
#import <MVMCore/MVMCoreLoggingHandler.h>
|
||||||
|
#import <MVMCore/MVMCoreLoadHandler.h>
|
||||||
|
|
||||||
@interface MVMCoreObject : NSObject
|
@interface MVMCoreObject : NSObject
|
||||||
|
|
||||||
@ -25,6 +26,7 @@
|
|||||||
@property (nullable, strong, nonatomic) MVMCoreViewControllerMappingObject *viewControllerMapping;
|
@property (nullable, strong, nonatomic) MVMCoreViewControllerMappingObject *viewControllerMapping;
|
||||||
@property (nullable, strong, nonatomic) MVMCoreActionHandler *actionHandler;
|
@property (nullable, strong, nonatomic) MVMCoreActionHandler *actionHandler;
|
||||||
@property (nullable, strong, nonatomic) MVMCoreSessionTimeHandler *sessionHandler;
|
@property (nullable, strong, nonatomic) MVMCoreSessionTimeHandler *sessionHandler;
|
||||||
|
@property (nullable, strong, nonatomic) MVMCoreLoadHandler *loadHandler;
|
||||||
|
|
||||||
// The delegates
|
// The delegates
|
||||||
@property (nullable, strong, nonatomic) id <MVMCoreGlobalLoadProtocol> globalLoadDelegate;
|
@property (nullable, strong, nonatomic) id <MVMCoreGlobalLoadProtocol> globalLoadDelegate;
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
self.sessionHandler = [[MVMCoreSessionTimeHandler alloc] init];
|
self.sessionHandler = [[MVMCoreSessionTimeHandler alloc] init];
|
||||||
self.actionHandler = [[MVMCoreActionHandler alloc] init];
|
self.actionHandler = [[MVMCoreActionHandler alloc] init];
|
||||||
self.loggingDelegate = [[MVMCoreLoggingHandler alloc] init];
|
self.loggingDelegate = [[MVMCoreLoggingHandler alloc] init];
|
||||||
|
self.loadHandler = [[MVMCoreLoadHandler alloc] init];
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user