Re: "So I want to connect to the internet in 2008..."
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