• 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: Client Development Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Client Development Question


  • Subject: Re: Client Development Question
  • From: Dorian J <email@hidden>
  • Date: Mon, 11 Jun 2007 12:47:42 -0500

The NSUrl family should be used when possible in cocoa. A combo of NSMutableURLRequest and NSURLConnection is probably the easiest way to submit a POST request. You'll have to set the headers yourself then URL encode the post data, but since HTTP is pretty simple, it should be pretty easy.

This guide shows how to send XML data, but you can make it fit your needs to use form-multipart or whatever:
http://www.awprofessional.com/articles/article.asp? p=468381&seqNum=2&rl=1


On Jun 11, 2007, at 12:28 PM, Christopher Smith wrote:

Hello all,

We have a Web Based application that is written in php and connects to a MySQL Database. We want to develop a Mac client for this application. Since there is no native way to connect a core data app to a MySQL database another approach is needed. So what we brainstormed was the following:

Construct a core data app with a GUI that will execute a http POST to our existing php post routines. We would then edit our post routines to "know" if the user was connected via the client or the existing web UI and IF using the client the result of the POST would be an XML file that we could then have the Mac Client parse and display in the GUI using the NSData elements.

My question is I do not know how to execute an http Post from a form utilizing standard NS Controls. Is this even possible or are we barking up the wrong tree. I saw plenty of documentation on Parsing the return XML, which would be the next thing to figure out. But if the POST is not possible we may be headed back to the drawing board.

Please forgive if this sounds like we are hunting in the dark here, but we have never built a Mac app and are very new to this whole thing. Any advice, suggestions, examples would be greatly appreciated

Christopher Smith
President
WebSmith/Software a division of Wordsmith Publishing Inc.

Phone:	610-717-1189
Email:	email@hidden
URL:   www.websmithsoftware.com



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
40dorianjohnson.com


This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >Client Development Question (From: Christopher Smith <email@hidden>)

  • Prev by Date: Client Development Question
  • Next by Date: Re: Localizing validation error strings with Core Data
  • Previous by thread: Client Development Question
  • Next by thread: Re: Client Development Question
  • Index(es):
    • Date
    • Thread