encodeRequest writes the neutral envelope with typed variables and extensions