-
Notifications
You must be signed in to change notification settings - Fork 0
Feed fetching #7
Comments
Because modern HTTP libraries are so easy to use I would not support fetching feeds. This is something our users should definitely be able to do themselves. |
👍 for restricting feed fetching to most basic use cases, there are enough libs focused on http requests. But we could add some read methods for some response types (like apache httpclient, okhttp etc) for convenience, so users can make the request however they want, by getting the response in Rome, we would have access to headers like charset etc, could be helpful when parsing the feed. |
I like the idea of providing some support for response types. Similarly to how jackson makes it easy to deserialize jaxrs responses with jackson-jaxrs-providers. |
Okay, I think we have a decision: no built-in fetching in Rome 2. Some support for existing http libraries can be convenient, but is a nice-to-have. We can think about it later. |
Pros
Cons
I was thinking maybe we can detect if there is a supported HTTP library on the classpath. For example apache or jersey, or okhttp. If there is no library we throw an exception. Modern HTTP libraries are very easy to use, so it shouldn't be hard to support several of them.
If we decide to expose a simple
fetch(String url)
, we need to somehow be explicit that it's only intended to be used for most basic use cases. Otherwise we will be flooded with questions like "why doesn't it work for website X?" or "how can I send custom headers?".The text was updated successfully, but these errors were encountered: