Factorized write function code for the web client
Implemented first step of the automated configuration