defunkt / jquery-pjax

pushState + ajax = pjax
https://pjax.herokuapp.com
MIT License
16.74k stars 1.97k forks source link

can't post text/plain form #685

Closed zhongqishang closed 3 years ago

zhongqishang commented 7 years ago

I want to post a form use text/plain enctype. how can I do it.

<form:form action="search" method="POST" enctype="text/plain" data-pjax>

...

$(document.body).on('submit', 'form', function(event) {
    event.preventDefault();
    $.pjax.submit(event, '#pjax-container');
});

I use this code to post a form, but I got this. Content-Type: multipart/form-data; boundary=---------------------------7e12f933207f4

So, if i want to use the text/plain enctype. how can I do it.