Return http responses for ajax requests
This commit is contained in:
parent
909293bbb0
commit
3c38a64a81
4 changed files with 27 additions and 9 deletions
|
@ -301,7 +301,10 @@ let BookWyrm = new class {
|
|||
ajaxPost(form) {
|
||||
return fetch(form.action, {
|
||||
method : "POST",
|
||||
body: new FormData(form)
|
||||
body: new FormData(form),
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue