• 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: JP May <email@hidden>
  • Date: Mon, 23 Jun 2008 16:06:33 +0100

Dear Mike Cohen,


Use a NSMutableURLRequest, change the method to POST using setHTTPMethod, add the form content with setHTTPBody, and finally send the request using a NSURLConnection.


OK, it makes perfect sense, thanks.



To be clear, one has to "roll-your-own" content-length. Indeed, one would of have to roll-your-own body, i.e., appropriately encoding and adding together your form elements.

Thus, in say Perl or whatever you can use say HTTP::Request::Common to trivially "build" a form body........

my $request = POST "https://internetblah.com"; , [
        'password' => 'secret',
        'username' => 'idiot', ....... etc

in contrast, in the NSURL milieu WE have to, on our OWN,

construct a string something like:

password=sec ret&username+big idiot

and also figure out the string length, etc.

Is that about right?

In other words, there is nothing like

http://kobesearch.cpan.org/htdocs/libwww-perl/HTTP/Request/Common.html

in XCode!  Is that about right?


Thanks!

JPM
_______________________________________________
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: Jens Alfke <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>)

  • 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..."
  • 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..."
  • Index(es):
    • Date
    • Thread