(refactor) Make body optional to mark when body was written to.

Enables more flexible behavior for defaulting the body.

Should not break too much existing code as most things should be using serve or serve_file anyway.