Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multipart POST using NSInputStream subclass



On May 16, 2007, at 9:35 AM, Dave Dribin wrote:

Can you comment if this will be addressed for Leopard? This is probably the 3rd or 4th issue with NSURLConnection that I've come across that makes it more difficult than it should be to write HTTP- based client apps. Most seem to relate to multipart POST, though the shared NSURLCredentialStorage is pretty nasty, too. I've been tempted to look at CURLHandle, but that's based on the deprecated NSURLHandle and itself hasn't been updated in years. I don't want to code against libcurl directly if I don't have to, but that's still an option I'm keeping in my back pocket.

Coding to libcurl directly is pretty easy, as long as you remember that it generally doesn't copy C strings that are passed in as options. As such, you usually have to keep them around for the life of your connection.


If you're doing anything sophisticated with HTTP at all, I would not hesitate to throw out NSURLConnection and switch to curl on a thread. It works better, uses less CPU, has more features, and is more easily debugged. For simple cases, I still use NSURLConnection because the API is easier, and I don't have to worry about building my own libcurl, or dealing with whatever version is pre-installed.

- Ladd

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macnetworkprog/email@hidden

This email sent to email@hidden
References: 
 >Multipart POST using NSInputStream subclass (From: Dave Dribin <email@hidden>)
 >Re: Multipart POST using NSInputStream subclass (From: Quinn <email@hidden>)
 >Re: Multipart POST using NSInputStream subclass (From: Dave Dribin <email@hidden>)
 >Re: Multipart POST using NSInputStream subclass (From: Becky Willrich <email@hidden>)
 >Re: Multipart POST using NSInputStream subclass (From: Dave Dribin <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.