HTTP请求url中文转码

  NSString *urlStr = [NSString stringWithFormat:@"userName=&psw="];
    urlStr = [urlStr stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLUserAllowedCharacterSet];
]];
原文地址:https://www.cnblogs.com/arenouba/p/5534225.html