You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -3,22 +3,6 @@ STNetTaskQueue is a networking queue library for iOS and OS X. It's abstract and
3
3
4
4
STNetTaskQueue avoid you from directly dealing with "url", "request packing" and "response parsing". All networking tasks are described and processed by subclassing STNetTask, which provides you a clean code style in UI layer when handling networking.
STNetTaskQueue will get all non-readonly properties from "location" and pack them to parameters for you. See [Get Started](https://github.com/kevin0571/STNetTaskQueue#get-started) for more details.
21
-
22
6
## Features
23
7
- Auto packing parameters for HTTP net task.
24
8
- Max concurrent tasks count in each STNetTaskQueue.
// STHTTPNetTask will pack non-readonly properties which is number, BOOL, NSString, NSDictionary, NSArray or object conforms to STHTTPNetTaskRequestObject, also parameters returned by overwritten method "parameters". Which means the final packed parameters would be:
149
-
// @{ @"lat": @"1.306038",
150
-
// @"lon": @"103.772962",
151
-
// @"user_info": @"user info",
152
-
// @"other_parameter": @"value" }
153
-
154
-
// Task delegate will be a weak reference, so there is no need to remove it manually.
155
-
// It's appropriate to add task delegate here because duplicated task delegates will be ignored by STNetTaskQueue.
@property (nonatomic, assign, readonly) BOOL readOnlyProperty; // Read only property will not be packed into parameters
170
120
171
121
@end
172
122
```
173
123
124
+
#### Step 3: Send net task and delegate for the result
174
125
```objc
175
-
@implementationSTLocation
176
-
177
-
// If you want to ignore some properties when packing the request object, return an array with property names.
178
-
- (NSArray *)ignoredProperties
179
-
{
180
-
return @[ @"ignoredValue" ];
181
-
}
182
-
183
-
// This is optional, if this is not implemented, underscore "_" will be used as separator when packing parameters. Which means if you use CamelCase naming for your property, it will be converted to lower cases string separated by "_", e.g. "userInfo" will be packed as "user_info" in parameters.
0 commit comments