'Posting a file with a raw XML using RestClient

I've been using similar XML Posts with success....just that this one calls for ProofPDF which is a byte array.

How can I populate this XML Tag properly... I'm getting an invalid request at the moment.

    public async void Post(List<IFormFile> files)
    {
        MemoryStream s = new MemoryStream();
        files[0].CopyTo(s); 

        var client = new RestClient("https://api.2312312312dsa.com/default.asmx");
        var request = new RestRequest();
        request.AddHeader("SOAPAction", "http://api.giuhuiu.com/v20/LifelineStatus_Update");
        request.AddHeader("Content-Type", " text/xml; charset=utf-8");         
        request.AddBody("<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Body> <EP_Update xmlns=\"http://api.dddd23432.com\"><Request><Credentials><Username>dddd</Username><Password>dddd</Password><Client>test</Client></Credentials><CustomerID>1234454</CustomerID><Status>APPROVED</Status>" 
            + "<ProofPDF>"+ s.ToArray()+"</ProofPDF>"  //Here is the concerning code           
            + "<Program>Apples</Program>"
            + "</Request></EP_Update></soap:Body></soap:Envelope>", "txt/xml");
        var response = client.PostAsync(request);          
        var m = response.Result;
        return;
    }


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source