我需要我的應用程序發送一個HTTP請求到我的服務器,這是鏈接,但由於某種原因,當我創建一個NSString stringwithformat並非所有的字符串都複製到字符串中時,objective-c NSString stringwithformat的URL
這是我的網址:
http://192.168.50.204:8080/webapi/originate?sofia/internal/408%25192.168.50.204%20'set:effective_caller_id_number=722772408,bridge:sofia/gateway/012smile/[email protected]'%20inline%200545890183%200545890183
,如果我把它放在我的瀏覽器,它工作正常。
,這是代碼:
self.feedURLString = [NSString stringWithFormat:@"http://192.168.50.204:8080/webapi/originate?sofia/internal/%@%25192.168.50.204%20'set:effective_caller_id_number=722772%@,bridge:sofia/gateway/012smile/%@@212.199.220.21'%20inline%20%@%20%@",extention,extention,PhoneNumber,PhoneNumber, PhoneNumber];
記住,有一些20%和25%的URL,也許是導致該問題...
字符串我進去所述的NSLog是:
feedURLString = http://192.168.50.204:8080/webapi/originate?sofia/internal/408220 '設置:effective_caller_id_number = 722772408,橋:sofia/gateway/012smile/[email protected]' 93610576nline2 @ 2 @