Pregunta

I would like to create a generic Web API action that will accept a JSON URL as a parameter, then convert it to RSS. Everywhere I look I find RSS to JSON but not the other way around.

I did not want to use a 3rd party service but instead looking for a library that can do this. Any idea on how to leverage Web API to do this or should I just create a simple HTTP Handler for this?

¿Fue útil?

Solución

You could implementing your own RSS or Atom custom MediaTypeFormatter. You can implement it so that the request will use this formatter when the accept header is set to application/atom+xml or application/rss+xml.

Filip has a blog describing this: RSS & Atom MediaTypeFormatter for ASP.NET WebAPI

Otros consejos

Superfeedr provide a feed API which does RSS to JSON conversion both when you poll feeds and when you want to be notified for changes in them.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top