Update send_to_endpoint to allow null content and have nicer error messages (and not use inlineCallbacks).