Skip to content

Instantly share code, notes, and snippets.

@khanlou

khanlou/SKLoginRequest.m Secret

Last active Aug 29, 2015
Embed
What would you like to do?
SKLoginRequest
@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