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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With