• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Setting the port of an NSURL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Setting the port of an NSURL (From: Development <email@hidden>)

  • Prev by Date: Setting the port of an NSURL
  • Next by Date: Re: NSUndoManager auto-grouping?
  • Previous by thread: Setting the port of an NSURL
  • Next by thread: Sending a non http request
  • Index(es):
    • Date
    • Thread