NSURL *url = [NSURL URLWithString:@"http://www.testurl.com:8080/subpath/subsubpath?uid=123&gid=456"];
[url scheme]
http
[url host]
www.testurl.com
[url port]
8080
[url path]
/subpath/subsubpath
[url lastPathComponent]
subsubpath
[url query]
uid=123&gid=456