GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Added STHTTPNetTaskIgnoreAllProperties to conveniently ignore all aut… · kevin-lyn/STNetTaskQueue@7093274

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • STNetTaskQueueTest/STNetTaskQueueTest
    • STTestDeleteNetTask.m
    • STTestGetNetTask.m
    • STTestPatchNetTask.m
  • STNetTaskQueue
    • STHTTPNetTask.h
    • STHTTPNetTaskParametersPacker.m
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎STNetTaskQueue/STHTTPNetTask.h‎

Copy file name to clipboardExpand all lines: STNetTaskQueue/STHTTPNetTask.h
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ FOUNDATION_EXPORT NSString *const STHTTPNetTaskErrorResponseDataUserInfoKey;
1818

1919
FOUNDATION_EXPORT NSString *STHTTPNetTaskRequestObjectDefaultSeparator;
2020

21+
#define STHTTPNetTaskIgnoreAllProperties @[ @"*" ]
22+
2123
typedef NS_ENUM(NSUInteger, STHTTPNetTaskMethod) {
2224
STHTTPNetTaskGet,
2325
STHTTPNetTaskPost,
Collapse file

‎STNetTaskQueue/STHTTPNetTaskParametersPacker.m‎

Copy file name to clipboardExpand all lines: STNetTaskQueue/STHTTPNetTaskParametersPacker.m
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ - (NSDictionary *)parametersFromRequestObject:(id<STHTTPNetTaskRequestObject>)re
4141
}
4242

4343
NSSet *ignoredProperties = [NSSet setWithArray:[requestObject ignoredProperties]];
44+
if (ignoredProperties.count == 1 && [ignoredProperties.anyObject isEqualToString:@"*"]) {
45+
return nil;
46+
}
4447
NSMutableDictionary *parameters = [NSMutableDictionary new];
4548

4649
unsigned int numberOfProperties;
Collapse file

‎STNetTaskQueueTest/STNetTaskQueueTest/STTestDeleteNetTask.m‎

Copy file name to clipboardExpand all lines: STNetTaskQueueTest/STNetTaskQueueTest/STTestDeleteNetTask.m
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ - (NSString *)uri
2222

2323
- (NSArray *)ignoredProperties
2424
{
25-
return @[ @"id" ];
25+
return STHTTPNetTaskIgnoreAllProperties;
2626
}
2727

2828
@end
Collapse file

‎STNetTaskQueueTest/STNetTaskQueueTest/STTestGetNetTask.m‎

Copy file name to clipboardExpand all lines: STNetTaskQueueTest/STNetTaskQueueTest/STTestGetNetTask.m
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ - (void)didResponseDictionary:(NSDictionary *)dictionary
2727

2828
- (NSArray *)ignoredProperties
2929
{
30-
return @[ @"id" ];
30+
return STHTTPNetTaskIgnoreAllProperties;
3131
}
3232

3333
@end
Collapse file

‎STNetTaskQueueTest/STNetTaskQueueTest/STTestPatchNetTask.m‎

Copy file name to clipboardExpand all lines: STNetTaskQueueTest/STNetTaskQueueTest/STTestPatchNetTask.m
+1-6Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,14 @@ - (NSString *)uri
2020
return [NSString stringWithFormat:@"posts/%d", self.id];
2121
}
2222

23-
- (NSDictionary *)parameters
24-
{
25-
return @{ @"title": self.title };
26-
}
27-
2823
- (void)didResponseDictionary:(NSDictionary *)dictionary
2924
{
3025
_post = dictionary;
3126
}
3227

3328
- (NSArray *)ignoredProperties
3429
{
35-
return @[ @"id" ];
30+
return @[ NSStringFromSelector(@selector(id)) ];
3631
}
3732

3833
@end

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.