Skip to content

想问一下,这个开源项目最后是如何把RSS的JS对象转换成XML文本的? #16187

Answered by TonyRL
good1uck asked this question in Q&A
Discussion options

You must be logged in to vote

switch (outputType) {
case 'ums':
case 'rss3':
return ctx.json(rss3(result));
case 'json':
ctx.header('Content-Type', 'application/feed+json; charset=UTF-8');
return ctx.body(json(result));
case 'atom':
return ctx.render(<Atom data={result} />);
default:
return ctx.render(<RSS data={result} />);
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@good1uck
Comment options

Answer selected by good1uck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #16186 on July 17, 2024 04:28.