Skip to content

How can I get raw body of response? #1656

Answered by todordev
todordev asked this question in Q&A
Discussion options

You must be logged in to vote

Thank you very much!
So, I found that page.content() returns rendered HTML. response.body() returns the raw HTML code.

// Rendered HTML
const renderedHtml = await page.content();

// Raw HTML
const rawHtml = await response.body().toString();

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by metalwarrior665
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