It looks like it would be a lot simpler if that route was able to work with the hex string form of the hash returned by broadcast_tx.