JQuery Sending POST Form Data with ------WebKitFormBoundary instead of serialized variables

288 Views Asked by At

I am sending a generated POST request to a Node form processor, and instead of sending form data like this:

url=https%3A%2F%2Fwww.test.com%2F&name=test

It sends this:

    ------WebKitFormBoundaryqpZZVHfQU2S8f5t0
Content-Disposition: form-data; name="url"

https://www.test.com/
------WebKitFormBoundaryqpZZVHfQU2S8f5t0
Content-Disposition: form-data; name="name"

test
------WebKitFormBoundaryqpZZVHfQU2S8f5t0--

How do I make it send the simple version?

Here's the code:

var fData = new FormData();
fData.append( 'url', 'https://www.test.com/' );
fData.append( 'name', 'name' );
$.ajax({
      processData: false,
      url : '/formprocessor',
      type: 'POST',
      data : fData,
      dataType: 'json',
      contentType: false
 })
0

There are 0 best solutions below