Encoding string arguments for URLs

后端 未结 3 716
误落风尘
误落风尘 2021-01-25 03:22

I created a method to build URLs for me.

- (NSString *)urlFor:(NSString *)path arguments:(NSDictionary *)args
{
    NSString *format = @\"http://api.example.com/         


        
3条回答
  •  孤独总比滥情好
    2021-01-25 03:44

    You should consider using Google Toolbox for Mac's GTMNSString+URLArguments; it's designed for exactly this purpose.

提交回复
热议问题