#import "SingleBlockingDownload.h"

@implementation SingleBlockingDownload

+ (NSData *)downloadFromURL:(NSURL *)url timeout:(NSTimeInterval)timeout
{
	NSURLRequest *request = [NSURLRequest requestWithURL:url cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:timeout];
	NSURLResponse *dummyResponse;
	
	// download the data synchronously
	NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:&dummyResponse error:NULL];
	return data;
}

@end