<p>Say I want to get the HTML of</p>

<pre>http://www.google.com</pre>

<p>as a String using some built-in classes of the Cocoa Touch framework.</p>

<p>What is the least amount of code I need to write?</p>

<p>I've gotten this far, but can't figure out how to progress. There must be an easier way.</p>

<pre><code>CFHTTPMessageRef req;
NSURL *url = [NSURL URLWithString:@"http://www.google.com"];
req = CFHTTPMessageCreateRequest(kCFAllocatorDefault,
                                 CFSTR("GET"),
                                 (CFURLRef)url,
                                 kCFHTTPVersion1_1);
</code></pre>

The
quickest
way is to use NSString's
```
+stringWithContentsOfURL:
```
method. However, this is a modal call, and your application will be non-responsive while it runs. You can either move it to a background thread, or use the NSURLConnection class to make a proper, asynchronous request.