• 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: "So I want to connect to the internet in 2008..."
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "So I want to connect to the internet in 2008..."


  • Subject: Re: "So I want to connect to the internet in 2008..."
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 23 Jun 2008 10:03:30 -0700


On 23 Jun '08, at 8:06 AM, JP May wrote:

To be clear, one has to "roll-your-own" content-length.

No. NSURLRequest will set the Content-Length header for you.

Indeed, one would of have to roll-your-own body, i.e., appropriately encoding and adding together your form elements.

Correct. There is no built-in support for the standard form encoding format. This is probably because Cocoa is rarely if ever used to implement server-side CGIs; and these days, most client-side programmatic access to web services is done using interfaces like REST or XML-RPC that don't require the client to pretend to be an HTML form.


That said, it's really easy to generate the right output. Looks like you already know the format. To do the correct encoding of the string contents you'll need to call [paramString stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding].

—Jens _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: "So I want to connect to the internet in 2008..."
      • From: Jim Luther <email@hidden>
    • Re: "So I want to connect to the internet in 2008..." / SUMMARY
      • From: JP May <email@hidden>
References: 
 >"So I want to connect to the internet in 2008..." (From: JP May <email@hidden>)
 >Re: "So I want to connect to the internet in 2008..." (From: JP May <email@hidden>)
 >Re: "So I want to connect to the internet in 2008..." (From: Mike Cohen <email@hidden>)
 >Re: "So I want to connect to the internet in 2008..." (From: JP May <email@hidden>)

  • Prev by Date: Re: "So I want to connect to the internet in 2008..."
  • Next by Date: Re: "So I want to connect to the internet in 2008..." / SUMMARY
  • Previous by thread: Re: "So I want to connect to the internet in 2008..."
  • Next by thread: Re: "So I want to connect to the internet in 2008..." / SUMMARY
  • Index(es):
    • Date
    • Thread