0

I'm using form data in Javascript to send my inputs to the server but I noticed something funky. In Firefox and Chrome it sends back extra text along with the data and adds it to the original value. Here is an example of what chrome outputs

------WebKitFormBoundaryq5GElQTvd3mbU5qE--

Here is my code. I am doing a PUT request.

var formData = new FormData();
                formData.append('user','tester');
                var req = new XMLHttpRequest();

                req.onload=function(e){
                    console.log(this)
                }

                req.open('PUT','http://localhost/site_template/create_file.php',true);
                req.send(formData);
Caleb Prenger
  • 1,537
  • 4
  • 13
  • 13
  • Possible duplicate of [What does the random string after a WebKitFormBoundary do \ mean?](http://stackoverflow.com/questions/21671138/what-does-the-random-string-after-a-webkitformboundary-do-mean) – nils Apr 14 '16 at 20:36
  • Say it's a repeat, but the link provided no answer on how to deal with it – Caleb Prenger Apr 14 '16 at 22:44
  • What is your question exactly? This is standard browser behavior, as far as I can see. – nils Apr 14 '16 at 23:59
  • How do you deal with the extra text server side. Obviously it's no good to store it along with the content that's needed – Caleb Prenger Apr 15 '16 at 12:12

0 Answers0