code: def set_http_body(self, coap_response):
          
          if coap_response.payload is not None:
              body = "<html><body><h1>", coap_response.payload, "</h1></body></html>"
              self.wfile.write("".join(body))
          else:
              self.wfile.write("<html><body><h1>None</h1></body></html>")
docs: Set http body.
  
          :param coap_response: the coap response