NSURL cheat sheet
There are lots of various parts of NSURL that you can access through methods, and the documentation on what exactly is included in each of those parts is sparse. So I have here a cheat sheet that I created that I hope will be useful to others as well:
Based on:
http://user:password@www.test.com:80/somefolder/someapi.php;oneparam;twoparam?somekey=someValue&anotherkey=anotherValue#anchor
absoluteString
http://user:password@www.test.com:80/somefolder/someapi.php;oneparam;twoparam?somekey=someValue&anotherkey=anotherValue#anchor
absoluteURL
http://user:password@www.test.com:80/somefolder/someapi.php;oneparam;twoparam?somekey=someValue&anotherkey=anotherValue#anchor
fragment
anchor
host
www.test.com
lastPathComponent
someapi.php
parameterString
oneparam;twoparam
password
password
path
/somefolder/someapi.php
pathComponents
NSArray – (“/”,somefolder,”someapi.php”)
pathExtension
php
port
80
query
somekey=someValue&anotherkey=anotherValue
relativePath
/somefolder/someapi.php
relativeString
http://user:password@www.test.com:80/somefolder/someapi.php;oneparam;twoparam?somekey=someValue&anotherkey=anotherValue#anchor
resourceSpecifier
//user:password@www.test.com:80/somefolder/someapi.php;oneparam;twoparam?somekey=someValue&anotherkey=anotherValue#anchor
scheme
http
standardizedURL
http://user:password@www.test.com:80/somefolder/someapi.php;oneparam;twoparam?somekey=someValue&anotherkey=anotherValue#anchor
user
user
1 Comment
Other Links to this Post
-
hyoki's me2day — September 23, 2011 @ 1:10 am
RSS feed for comments on this post. TrackBack URI