asp.net httphandler 递归
我正在使用 .net 的 RssToolkit。我正在使用 Httphandler 返回 rss feed。 feedID 作为查询字符串参数传入。如果没有传入参数,我希望处理程序返回一个提要,该提要是处理程序可以处理的一些提要的聚合。我想知道的是,处理程序可以递归吗?它可以使用查询字符串参数多次调用自身并检索多个提要,然后返回编译结果吗?或者 httpHandler 无法以这种方式递归?
例如,
如果您去了 RSS.ashx 它将调用 rss.ashx?c=feed1 和 rss.ashx?c=feed2 其中每个都会返回一个 RSS 提要,并将它们编译成一个聚合并将其作为 rss.ashx 返回。
I'm using the RssToolkit for .net. I'm using an Httphandler to return rss feeds. The feedID is passed in as a querystring parameter. If no parameter is passed in, I would like to have the the handler return a feed that is an aggreate of some of the feeds that the handler can handle. What I'm wondering is, can the handler recurse? Can it call itself with a querystring parameter several times and retrieve several feeds and then return the compiled result. Or is the httpHandler unable to recurse in this manner?
for exampele
if you went to
rss.ashx
it would call rss.ashx?c=feed1 and rss.ashx?c=feed2
each of these would return an RSS feed and it would compile them into an aggregate and return it as rss.ashx.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您正在对 Web 服务器进行新的调用,那么它会(在某种意义上),但这并不是真正的递归。但为什么要这么做呢?只需让您的处理程序确定它需要做什么,然后执行即可。如果 querystring == null 则 c=... 如果不是,则进行重定向
It will (in a sense) if you're making a new call to the web server but that's not really recursion. but why do that? Just have your handler determine what it needs to do and then do it. If querystring == null then c=... If not that then do a redirect instead