Without modifying the function itself:
onclick="(async () => { await req('name=vmode&value=full','POST','/cookie'); window.location.href = this.href; })()"