Fix xml not formatted correctly
Fix xml not formatted correctly

Fix freshbook webservice response "Your XML is not formatted correctly" that happened when the posted XML contains characters that are more than 1 byte size encoded in UTF-8, such as french accents for example éàù, or others characters like € (3 bytes) and way more others.
The problem comes from the 'Content-Length': string.length in index.js, this only worked if the xml contains 1 byte characters encoded. If not, the Content-Length sent is too short and the xml is cutted before the end.

I fixed this using Buffer.byteLength: Returns the actual byte length of a string.
https://nodejs.org/api/buffer.html#buffer_class_method_buffer_bytelength_string_encoding
flowxo/freshbooks.js