-
-
Save khanlou/2d7ba99e99c2e7f6933c to your computer and use it in GitHub Desktop.
SKLoginRequest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation SKLoginRequest | |
- (instancetype)initWithUsername:(NSString *)username password:(NSString *)password { | |
self = [super init]; | |
if (!self) return nil; | |
_username = username; | |
_password = password; | |
return self; | |
} | |
- (NSString *)method { | |
return @"POST"; | |
} | |
- (NSURL *)baseURL { | |
return [NSURL URLWithString:@"https://api.khanlou.com"]; | |
} | |
- (NSString *)path { | |
return @"/users/login"; | |
} | |
- (NSDictionary *)parameters { | |
return @{ | |
@"username": self.username, | |
@"password": self.password, | |
} | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment