canjs / can-ajax

jQuery-inspired AJAX request library.
https://canjs.com/doc/can-ajax.html
MIT License
5 stars 7 forks source link

Body payload is appending to the url query string instead of request body #75

Open eddypjr opened 2 years ago

eddypjr commented 2 years ago

When can-ajax is used with the PATCH method, the body payload should append to the request body, not the url query string.

gregorgodoy commented 2 years ago

I think we have to change line 221

from

var isPost = type === "POST" || type === "PUT"

to

var isPost = type === "POST" || type === "PUT" || type === "PATCH"

I tried it locally and works as expected.