What is the difference between open( ) and send ( ) methods of XMLHttpRequest object?

前端 未结 3 851
醉梦人生
醉梦人生 2021-02-20 06:06

XMLHttpRequest object:

open ( , , )
send () <

相关标签:
3条回答
  • 2021-02-20 06:22

    1.open() method will open specific url ( for open on server) 2.send() method Sends an HTTP request to the server and receives a response.

    0 讨论(0)
  • 2021-02-20 06:32

    The HTTP and HTTPS requests of the XMLHttpRequest object must be initialized through the open method. This method must be invoked prior to the actual sending of a request to validate and resolve the request method, URL, and URI user information to be used for the request. This method does not assure that the URL exists or the user information is correct. This method can accept up to five parameters, but requires only two, to initialize a request.

    0 讨论(0)
  • 2021-02-20 06:34

    open() does not open the connection; it only configures the request, but the network activity only starts with the call of send ()

    0 讨论(0)
提交回复
热议问题