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: URLAccess Stalls




On 15 Dec 2005, at 19:07, email@hidden wrote:

On Dec 14, 2005, at 5:55 PM, Marc Krochmal wrote:

We highly encourage you to make the transition to CFNetwork. Here's some sample code to get you started. None of it contains any Objective-C.

<http://developer.apple.com/samplecode/CFFTPSample/CFFTPSample.html>
<http://developer.apple.com/samplecode/CFNetworkHTTPDownload/ CFNetworkHTTPDownload.html>

Thanx, the examples don't look too bad. I'll just say if( OSX ) in my class to decide whether to use URLAccess or CF, unless there is a certain version of OS X where it would be a good idea to still use URLAccess, like say 10.1?


OK, I actually have used http enough that I can run it from telnet, I have functions to parse the headers and cookies, etc. I have made Get/Set operators for key/valye pairs that act a lot like associative arrays in javascript. So I could probably program the whole thing now over a socket, although it would be ugly. Do NSURL or CFHTTPStream, or even CFNetwork have functions for individual items in the header?

CFHTTPMessage will parse the headers for you (CFHTTPMessageCopyAllHeaderFields; CFHTTPMessageCopyHeaderFieldValue ), and will enable you to set the headers (CFHTTPMessageSetHeaderFieldValue).
NSMutableURLRequest will do that as well. On the cocoa side there are the NSHTTPCookie/NSHTTPCookieStorage will create/parse the relevant cookie headers.



And what I really need is SSL support. I want to be able to just type https in the URL and have it "just work". I'm wondering which of the methods is better for that.

CFHTTP will do that just fine.
Also, I have never done anything with a proxy server, but should I need that, is there a way to just add it in, and which of these would be better for that?

SCDynamicStoreCopyProxies gets you a CFDictionary with the current system proxy settings that you can stick straight into the CFHTTP functions. If your proxy requires authentication you have to do a little more work with the Keychain if you want to be able to grab the password the user has stored for the proxy.


Fred
_______________________________________________
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: 
 >Re: URLAccess Stalls (From: Alexey Proskuryakov <email@hidden>)
 >Re: URLAccess Stalls (From: Marc Krochmal <email@hidden>)
 >Re: URLAccess Stalls (From: email@hidden)
 >Re: URLAccess Stalls (From: Marc Krochmal <email@hidden>)
 >Re: URLAccess Stalls (From: "Alexey Proskuryakov" <email@hidden>)
 >Re: URLAccess Stalls (From: David Young <email@hidden>)
 >Re: URLAccess Stalls (From: "Alexey Proskuryakov" <email@hidden>)
 >Re: URLAccess Stalls (From: 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.