Problem to Solve
Not an actual problem, but on SSR apps returning html or html fragments is pretty common, and currently
Response.ok(
body: Body.fromString(
myHtml,
mimeType: MimeType.html,
),
)
feels too verbose
Proposal
A minimal and simple constructor for html responses
Response.html(
final String html, {
final int statusCode = 200,
final Headers? headers,
}) : this(
statusCode,
body: Body.fromString(html, mimeType: MimeType.html),
headers: headers ?? Headers.empty(),
);
Use Case
x
Alternatives
x
Additional context
No response
How experienced are you with this library?
Intermediate - Familiar with the basics or have used it in a few projects
Are you interested in working on a PR for this?
Problem to Solve
Not an actual problem, but on SSR apps returning html or html fragments is pretty common, and currently
feels too verbose
Proposal
A minimal and simple constructor for html responses
Use Case
x
Alternatives
x
Additional context
No response
How experienced are you with this library?
Intermediate - Familiar with the basics or have used it in a few projects
Are you interested in working on a PR for this?