"So I want to connect to the internet in 2008..."
"So I want to connect to the internet in 2008..."
- Subject: "So I want to connect to the internet in 2008..."
- From: JP May <email@hidden>
- Date: Mon, 23 Jun 2008 12:24:10 +0100
Hello,
My Mac application SillyApp (FWIW: XCode, Intel Only) wants to make a
trivial connection to a web server, in fact, it wants to post a form,
to grab some data.
Thus, imagine a trivial html form:
<form method=post action='https://www.sillyJP.com/cgi-bin/silly.cgi'>
<input name='person' value='jp'>
<input name='IQ' value='low'>
<input name='height' value='6'>
</form>
imagine that html fragment ran within any web browser and connected
to silly.cgi, likely getting some result. Now, my application
SillyApp, wants to "pretend" it is just like said web browser.
(Naturally it wants to do this in the "background" so to speak,
threading away, not of course locking up the app.)
My question to you experts please is:
what's the "best way" or "most current idiom" for doing this in XCode
/ OSX programming ??? Does anyone know, please?
I am more of a unix network worker and I find the legacy / level
aspects on Mac confusing!
I don't know the "most appropriate way to do it now." But I want to
do it very much the Mac Way Today.
Hence, should I use say
http://developer.apple.com/samplecode/CFNetworkHTTPDownload/index.html
CFNetworkHTTPDownload
which seems to be from the "Core Foundation" legacy-history layer ???
Would it be more appropriate (i.e., "do all you guys ...") roll your
own at the Darwin (?) level...
http://developer.apple.com/samplecode/Networking/idxDarwin-date.html
which seems to be from about 2003,
Should I be using Cocoa-level calls somehow or other??
I want to be one of the guys and do it the same way that modern Mac
programmers would do it, right now in 2008. Can anyone please help
????
I truly appreciate it.
Does the fact that the form in question
<form method=post action='https://www.sillyJP.com/cgi-bin/silly.cgi'>
is of course SSL complicate matters? (Surely not in 2008?)
Come to think of it I guess a more basic question is, what is the
"usual, proper" way for SillyApp to simply fetch the result from a
plain URL ?
eg, http[s]://sillyJP.com/sillyinfo.html has some text and we want it.
In fact, is CFNetworkHTTPDownload basically the answer?
Is CFNetworkHTTPDownload the way everyone gets text from a URL these days?
And you roll your own form? Or ??
Does this thread here ...
http://lists.apple.com/archives/macnetworkprog/2005/Dec/msg00066.html
Which is 3 years old, basically show the current state of the art for
posting a form?
Or is there now a totally new technology or layer where you just say
ThreadFormGrab( "https" "sillyjp.com" "cgi-bin/silly/cgi" "height->6"
"width->10" )
??
I truly appreciate anyone who can answer this question!!!!!!!!!!!!!!!!
Kindly,
JP
_______________________________________________
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