Add implementation of writeFormBody

Just as the title says. Hasn't been tested as I don't use this. I just thought it may be useful for @moechofe