0
我想與像空格字符串發送:
stack exchange
通過
[[ApiClient sharedClient] getPath:[NSString stringWithFormat:@"/search/?q=%@", @"stack exchange"] parameters:nil success:^ ...
但我越來越
Error Domain=NSURLErrorDomain Code=-1000 "bad URL"
我該如何解決這個問題?
你需要URL編碼字符串... http://stackoverflow.com/questions/8088473/url-encode-a-nsstring –