Re: Setting the port of an NSURL
Re: Setting the port of an NSURL
- Subject: Re: Setting the port of an NSURL
- From: Nick Zitzmann <email@hidden>
- Date: Tue, 15 Dec 2009 14:49:16 -0700
On Dec 15, 2009, at 2:42 PM, Development wrote:
> I need to send a post request to a URL but I need it sent to a port other than the standard 80, 8080 etc. How can I set the port that an NSURLRequest or URL is on?
[NSURL URLWithString:@"http://www.example.com:5555/path/to/something/"] and replace 5555 with the non-standard port number you wish to use. There is no built-in API that creates a new URL with a port number like -initWithScheme:host:path:, but you can just use a string instead...
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden