Skip to content

fix Twirl example to correctly render in a browser#189

Merged
lihaoyi merged 1 commit intocom-lihaoyi:masterfrom
nickfun:example-twirl-fix
Jan 1, 2026
Merged

fix Twirl example to correctly render in a browser#189
lihaoyi merged 1 commit intocom-lihaoyi:masterfrom
nickfun:example-twirl-fix

Conversation

@nickfun
Copy link
Contributor

@nickfun nickfun commented Dec 31, 2025

Issue

When I tried the Twirl example in my browser, I noticed the HTML wasn't rendering. This is due to the Content-Type header coming back as text/plain instead of text/html

Change

I build a full cask.Response object so I can set the content-type header. Ideally there is a better way to set this up. As I'm only just poking at the framework I'm not sure what the best way is, but I'm submitting what worked for me.

@lihaoyi lihaoyi merged commit 61bc009 into com-lihaoyi:master Jan 1, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants