ceylon-sdk icon indicating copy to clipboard operation
ceylon-sdk copied to clipboard

Should `get()` follow "301 Moved Permanently" automatically?

Open quintesse opened this issue 10 years ago • 4 comments

In commit @e54c2c952e0516347afa6ad06a009eee7c4321de I changed the http: in the URLs to https: because Wikipedia had started using HTTPS in the mean time. But browsers normally get redirected automatically, shouldn't we do the same?

quintesse avatar Jul 17 '15 13:07 quintesse

If we do, we're not low-level enough for higher-level libs to use this stuff and decide themselves what to do. If we don't, we're not high-level enough to be useful.

FroMage avatar Jul 17 '15 13:07 FroMage

Parameter followRedirects, defaults to true? (Or possibly: defaults to { 301, 302, 307 }, allowing you to specify which status codes to follow)

lucaswerkmeister avatar Jul 17 '15 13:07 lucaswerkmeister

Really we need two levels of API, don't we? Because there are plenty of other things which we don't support very well right now, cookies and authentication for example. And conditional requests etc. And I've no idea how/when connections get closed, but that's another thing a serious API would give you control over.

tombentley avatar Jul 17 '15 13:07 tombentley

Closing connections is something i need too. Plesse dont hardcode too much functions into the low level API, i like to decide whether i want to get or just use the information for something else

klinger avatar Jul 17 '15 13:07 klinger