@@ -119,7 +119,7 @@ - (BFTask *)runCommandAsync:(PFRESTCommand *)command withOptions:(PFCommandRunni
119119- (BFTask *)runCommandAsync : (PFRESTCommand *)command
120120 withOptions : (PFCommandRunningOptions)options
121121 cancellationToken : (BFCancellationToken *)cancellationToken {
122- return [self _performCommandRunningBlock: ^id {
122+ return [self _performCommandRunningBlock: ^id {
123123 [command resolveLocalIds ];
124124 NSURLRequest *request = [self .requestConstructor dataURLRequestForCommand: command];
125125 return [_session performDataURLRequestAsync: request forCommand: command cancellationToken: cancellationToken];
@@ -137,7 +137,7 @@ - (BFTask *)runFileUploadCommandAsync:(PFRESTCommand *)command
137137 cancellationToken : (nullable BFCancellationToken *)cancellationToken
138138 progressBlock : (nullable PFProgressBlock)progressBlock {
139139 @weakify (self);
140- return [self _performCommandRunningBlock: ^id {
140+ return [self _performCommandRunningBlock: ^id {
141141 @strongify (self);
142142
143143 [command resolveLocalIds ];
@@ -157,13 +157,14 @@ - (BFTask *)runFileDownloadCommandAsyncWithFileURL:(NSURL *)url
157157 targetFilePath : (NSString *)filePath
158158 cancellationToken : (nullable BFCancellationToken *)cancellationToken
159159 progressBlock : (nullable PFProgressBlock)progressBlock {
160- return [self _performCommandRunningBlock: ^id {
160+ return [self _performCommandRunningBlock: ^id {
161161 NSURLRequest *request = [NSURLRequest requestWithURL: url];
162162 return [_session performFileDownloadURLRequestAsync: request
163163 toFileAtPath: filePath
164164 withCancellationToken: cancellationToken
165165 progressBlock: progressBlock];
166- } withOptions: PFCommandRunningOptionRetryIfFailed cancellationToken: cancellationToken];
166+ } withOptions: PFCommandRunningOptionRetryIfFailed
167+ cancellationToken: cancellationToken];
167168}
168169
169170// /--------------------------------------
@@ -253,8 +254,8 @@ + (NSURLSessionConfiguration *)_urlSessionConfigurationForApplicationId:(NSStrin
253254- (void )urlSession : (PFURLSession *)session willPerformURLRequest : (NSURLRequest *)request {
254255 [[BFExecutor defaultPriorityBackgroundExecutor ] execute: ^{
255256 NSDictionary *userInfo = ([PFLogger sharedLogger ].logLevel == PFLogLevelDebug ?
256- @{ PFCommandRunnerNotificationURLRequestUserInfoKey : request } : nil );
257- [self .notificationCenter postNotificationName: PFCommandRunnerWillSendURLRequestNotification
257+ @{ PFNetworkNotificationURLRequestUserInfoKey : request } : nil );
258+ [self .notificationCenter postNotificationName: PFNetworkWillSendURLRequestNotification
258259 object: self
259260 userInfo: userInfo];
260261 }];
@@ -268,15 +269,15 @@ - (void)urlSession:(PFURLSession *)session
268269 NSMutableDictionary *userInfo = nil ;
269270 if ([PFLogger sharedLogger ].logLevel == PFLogLevelDebug) {
270271 userInfo = [NSMutableDictionary dictionaryWithObject: request
271- forKey: PFCommandRunnerNotificationURLRequestUserInfoKey ];
272+ forKey: PFNetworkNotificationURLRequestUserInfoKey ];
272273 if (response) {
273- userInfo[PFCommandRunnerNotificationURLResponseUserInfoKey ] = response;
274+ userInfo[PFNetworkNotificationURLResponseUserInfoKey ] = response;
274275 }
275276 if (responseString) {
276- userInfo[PFCommandRunnerNotificationURLResponseBodyUserInfoKey ] = responseString;
277+ userInfo[PFNetworkNotificationURLResponseBodyUserInfoKey ] = responseString;
277278 }
278279 }
279- [self .notificationCenter postNotificationName: PFCommandRunnerDidReceiveURLResponseNotification
280+ [self .notificationCenter postNotificationName: PFNetworkDidReceiveURLResponseNotification
280281 object: self
281282 userInfo: userInfo];
282283 }];
0 commit comments