Hello I am trying to parse Shoutcast radio's metadata in iOS.
After trying many submitted solutions, I end up with a piece of code that is still giving me error
Response String: ICY 404 Resource Not Found
icy-notice1:
SHOUTcast Distributed Network Audio Server/Linux v1.9.8
icy-notice2:The resource requested was not found
the code im trying to parse metadata
NSURL *url = [NSURL URLWithString:@"http://relay.181.fm:8052/7.html"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:15.0];
[request addValue:@"1" forHTTPHeaderField:@"icy-metadata"];
[request addValue:@"Winamp 5/3" forHTTPHeaderField:@"User-Agent"];
[request addValue:@"audio/mpeg" forHTTPHeaderField:@"Content-Type"];
[request setHTTPMethod:@"GET"];
NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
NSString* responseString = [[NSString alloc] initWithData:data encoding: NSUTF8StringEncoding];
NSLog(@"Response String: %@", responseString);
any ideas about problem, thanks for helping