Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A common mistake on network-service method that takes raw objects instead of models, resulting on really big parameters.
/// The result of this method will be sent via the @p RACSignal. Well, you can add more parameters if you want to...
- (RACSignal *)registerNewUserWithName:(NSString *)name
password:(NSString *)password
email:(NSString *)email
address:(NSString *)address
// Add your usual parameter validation here...
NSDictionary *payload = @{
@"user_name": name,
@"password": password,
@"email": email,
@"address": address
// More logic or network call here...
return networkRequestSignal;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment