Ios 如何在iPhone应用程序中传递url中的字符串值?
我有这个URL我想在这个URLIos 如何在iPhone应用程序中传递url中的字符串值?,ios,objective-c,Ios,Objective C,我有这个URL我想在这个URLcid=Self.Id中传递Self.Id。我通过了为什么,但得到的结果是无效的请求 NSURL *url = [NSURL URLWithString: @"http://sms.instatalkcommunications.com/apireq/GetCommentsForSMS? t=1&h=admin&last=0&cid=Self.Id&items=5"]; ASIHTTPRequest
cid=Self.Id
中传递Self.Id
。我通过了为什么,但得到的结果是无效的请求
NSURL *url = [NSURL URLWithString:
@"http://sms.instatalkcommunications.com/apireq/GetCommentsForSMS?
t=1&h=admin&last=0&cid=Self.Id&items=5"];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request setRequestMethod:@"GET"];
[request setDidFailSelector:@selector(requestCompleted:)];
[request setDelegate:self];
[request startAsynchronous];
[NSURL URLWithString:[NSString stringWithFormat:@"http://sms.instatalkcommunications.com/apireq/GetCommentsForSMS?
t=1&h=admin&last=0&cid=%@&items=5",Self.Id]];