>HTTP is HYPERTEXT TRANSFER PROTOCOL. You're getting Hypertext.
The responses HTTP gives are very file-like. So much so HTTP is often used for distributing files. Indeed, most pages reference several files.
> But does it give you the option to use global dns cache?
I don't believe so. I don't think most users need to, however.
> How about save the cookies and reuse them for later requests?
I can't actually remember. Possibly.
> Will it deal with gzip for me?
Yes.
> If you can do all the stuff curl can do I'll be all fair enough you've got a point.
It can do most of the stuff cURL does. It doesn't do everything, but my point is most of the time you don't necessarily need cURL, and IMO this API is nicer.
> For me the fact I had to define the header.
That's not hacky at all; sending POST requests usually requires specifying a Content-Type. cURL just automatically does that for you in some cases.
> It's not more readable. It says it's getting a file, you lied to me and got stream contents instead.
You did get a file. The file the request returned.
> If you really don't want to install extensions and just use the core language fair enough, I would rather use the best tools available.
You might be missing my point.