Re: Check URL Status
ok I got it together and it's working just fine On Jan 28, 2009, at 7:13 PM, Mike Abdullah wrote: On 29 Jan 2009, at 00:30, Mr. Gecko wrote: but wouldn't that return the data of the file it self as well? Because I don't want the data because it's like 130MB and it'll take a long time to get the data just for a check... Which is precisely why the URL loading system is asynchronous by design. You should set up the connection, wait until the NSURLResponse is received and then cancel the connection before it can download the full video file. Mike. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Check URL Status
On 29 Jan 2009, at 00:30, Mr. Gecko wrote: but wouldn't that return the data of the file it self as well? Because I don't want the data because it's like 130MB and it'll take a long time to get the data just for a check... Which is precisely why the URL loading system is asynchronous by design. You should set up the connection, wait until the NSURLResponse is received and then cancel the connection before it can download the full video file. Mike. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Check URL Status
On 28 Jan 09, at 16:30, Mr. Gecko wrote: but wouldn't that return the data of the file it self as well? Because I don't want the data because it's like 130MB and it'll take a long time to get the data just for a check... It'll return whatever response is appropriate for your request. Setting the HTTP method of your request to HEAD will get you what you're looking for. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Check URL Status
but wouldn't that return the data of the file it self as well? Because I don't want the data because it's like 130MB and it'll take a long time to get the data just for a check... On Jan 28, 2009, at 4:12 PM, Andrew Farmer wrote: On 28 Jan 09, at 13:15, Mr. Gecko wrote: yeah that wouldn't work for what I need, if I could just do NSHTTPURLResponse *response = [NSURLConnection responseForRequest:request]; that would work, but it's not in cocoa... Actually, it is. It's just named slightly differently... NSURLConnection sendSynchronousRequest:returningResponse:error: ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Check URL Status
On 28 Jan 09, at 13:15, Mr. Gecko wrote: yeah that wouldn't work for what I need, if I could just do NSHTTPURLResponse *response = [NSURLConnection responseForRequest:request]; that would work, but it's not in cocoa... Actually, it is. It's just named slightly differently... NSURLConnection sendSynchronousRequest:returningResponse:error: ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Check URL Status
yeah that wouldn't work for what I need, if I could just do NSHTTPURLResponse *response = [NSURLConnection responseForRequest:request]; that would work, but it's not in cocoa... On Jan 19, 2009, at 5:39 AM, Mike Abdullah wrote: Create a NSURLConnection for the HD URL. It will receive an NSHTTPURLResponse object with -statusCode 404. Mike. On 19 Jan 2009, at 01:20, Mr. Gecko wrote: Hello, I'm trying to find out how I can check a URL status in cocoa. I have two links to videos on a server one HD and one SD. sometime the HD isn't there and I need my program to check for 404 and if it has a 404 it'll revert to SD. Thanks for tips and or help, Mr. Gecko ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net This email sent to cocoa...@mikeabdullah.net ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Check URL Status
Create a NSURLConnection for the HD URL. It will receive an NSHTTPURLResponse object with -statusCode 404. Mike. On 19 Jan 2009, at 01:20, Mr. Gecko wrote: Hello, I'm trying to find out how I can check a URL status in cocoa. I have two links to videos on a server one HD and one SD. sometime the HD isn't there and I need my program to check for 404 and if it has a 404 it'll revert to SD. Thanks for tips and or help, Mr. Gecko ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net This email sent to cocoa...@mikeabdullah.net ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Check URL Status
On 18 Jan 09, at 17:20, Mr. Gecko wrote: Hello, I'm trying to find out how I can check a URL status in cocoa. I have two links to videos on a server one HD and one SD. sometime the HD isn't there and I need my program to check for 404 and if it has a 404 it'll revert to SD. What Have You Tried? http://whathaveyoutried.com/ ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Check URL Status
Hello, I'm trying to find out how I can check a URL status in cocoa. I have two links to videos on a server one HD and one SD. sometime the HD isn't there and I need my program to check for 404 and if it has a 404 it'll revert to SD. Thanks for tips and or help, Mr. Gecko ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com