Custom body

I checked out the example for writing a simple HTTP server to only serve text at this link. How would I write a handler function that accepts a string parameter for the body content? Am I being stupid here?
Was this page helpful?