/// <summary>
        /// Transform an xml-document to a HttpContent request message that accords to the TNT spec.
        /// It has to be application/x-www-form-urlencoded !
        /// It has to contain one key-value pair, "xml_in" being the key and the whole xml-string the value (urlencoded of course).
        /// The whole thing should be in UTF-8.
        /// </summary>
        /// <param name="xml">Xmldocument to send</param>
        private HttpContent BuildWWWFormUrlEncoded(MyXMLDocument xml)
        {
            Byte[] bytes;
            //First we get the xml to a stream... to make the XmlWriter believe it is boss of encoding (UTF-8)
            using (MemoryStream ms = new MemoryStream())
            {
                xml.ToStream(ms, new UTF8Encoding(false, true), indent: true);
                bytes = ms.ToArray();  //not exactly the streaming + async philosophy, but we have to do some strange stuff
            }
            //Then we get the stream into a bytes array to enable us to do URL-encoding
            Byte[] bytes2 = HttpUtility.UrlEncodeToBytes(bytes);
            //We create an un-encoded namevaluepair, with bytes2 als the value
            string prolog = "xml_in=";

            Byte[] bytes3 = Encoding.UTF8.GetBytes(prolog);
            //Concatenate: bytes3 + bytes2
            Byte[] bytes4 = new byte[bytes3.Length + bytes2.Length];
            Buffer.BlockCopy(bytes3, 0, bytes4, 0, bytes3.Length);
            Buffer.BlockCopy(bytes2, 0, bytes4, bytes3.Length, bytes2.Length);
            //...all of this because we had to do URLEncoding at an unusual time, after writing the xml
            HttpContent content = new ByteArrayContent(bytes4);

            content.Headers.ContentType = new MediaTypeHeaderValue("application/x-www-form-urlencoded");
            return(content);
        }