私はフォームのNSURLを持っています
"http://abc.def.com:1234/stuff/"
それに追加したいので、最終的なURLは次のようになります
"http://abc.def.com:1234/stuff/?x=123".
しかし、私がこれを行う場合
url = [NSURL URLWithString:@"http://abc.def.com:1234/stuff/?"];
url = [url URLByAppendingPathComponent:@"x=123"];
結果は
http://abc.def.com:1234/stuff/x=123?
(URLByAppendingPathExtension を使用した場合も同じ結果になります)。
しかし、私がこれを行う場合
url = [NSURL URLWithString:@"http://abc.def.com:1234/stuff/?"];
url = [url URLByAppendingPathComponent:@"x=123"];
結果は
http://abc.def.com:1234/stuff/%3Fx=123
(URLByAppendingPathExtension を使用した場合も同じ結果になります)。
どちらも私が求めているものではありません。"http://abc.def.com:1234/stuff/?x=123" の最終結果を取得するにはどうすればよいですか?