0
내 워드 프레스에서 JSON 끝 점이 있습니다. url과 post로 매개 변수를 보내야합니다.게시물 아약스는 끝에 백 슬래시 만 사용하여 작동합니다.
이 작동 : http://<mydomain>/wordpress/?my_action=getBooks
이 없습니다 : http://<mydomain>/wordpress?my_action=getBooks
난 후 매개 변수는 서버 측에서 누락 된 백 슬래시없이 보내는 경우
. 왜이 백 슬래시가 필요합니까?
jQuery.ajax({
url: 'http://<mydomain>/wordpress/?my_action=getBooks',
method: 'POST',
data: {test: 'abc' },
}).done(function (data) {
<do something>
}.bind(this));