GET vs POST in AJAX?

前端 未结 9 1431
北海茫月
北海茫月 2020-12-01 03:39

Why are there GET and POST requests in AJAX as it does not affect page URL anyway? What difference does it make by passing sensitive data over GET in AJAX as the data is not

9条回答
  •  南笙
    南笙 (楼主)
    2020-12-01 04:23

    When we use the GET method in Ajax, only the content of the value of the field is sent, not the format in which the content is. For example, content in the text area is just added in the URL in case of the GET method (without a new line character). That is not the case in the POST method.

提交回复
热议问题