object-c调用网址缩短api

短网址文档地址: usr.im

NSString *requestUrl = [NSString stringWithFormat:
                                 @"http://api.usr.im/short.txt?url=%@", @"http://tool.lu/"];
NSString *shortUrl = [NSString stringWithContentsOfURL:[NSURL URLWithString:requestUrl]
                                                   encoding:NSUTF8StringEncoding error:nil];
// NSLog(@"%@", url);

标签: none

添加新评论