send method
@AvailableInWorkers("window_and_worker_except_service")
The XMLHttpRequest method
send()
sends the request to the server.
If the request is asynchronous (which is the default), this method returns as soon as the request is sent and the result is delivered using events. If the request is synchronous, this method doesn't return until the response has arrived.
send()
accepts an optional parameter which lets you specify the
request's
body; this is primarily used for requests such as PUT
. If the request
method is GET
or HEAD
, the body
parameter is ignored and the request body is set to null
.
If no Accept
header has been set using the
XMLHttpRequest.setRequestHeader, an
Accept
header with the type "*/*"
(any type) is sent.
Implementation
external void send([JSAny? body]);