Add implementation of writeFormBody