@@ -26,10 +26,11 @@ #import "OFString_UTF8.h" #import "OFArray.h" #import "OFDictionary.h" #import "OFFile.h" #import "OFURL.h" +#import "OFHTTPClient.h" #import "OFHTTPRequest.h" #import "OFDataArray.h" #import "OFXMLElement.h" #import "OFHTTPRequestFailedException.h" @@ -724,10 +725,11 @@ - initWithContentsOfURL: (OFURL*)URL encoding: (of_string_encoding_t)encoding { void *pool; + OFHTTPClient *client; OFHTTPRequest *request; OFHTTPRequestResult *result; OFString *contentType; Class c; @@ -744,12 +746,13 @@ encoding: encoding]; objc_autoreleasePoolPop(pool); return self; } + client = [OFHTTPClient client]; request = [OFHTTPRequest requestWithURL: URL]; - result = [request perform]; + result = [client performRequest: request]; if ([result statusCode] != 200) @throw [OFHTTPRequestFailedException exceptionWithClass: [request class] request: request