This feature is experimental. Please share your experiences so we know what to keep or change.
Aborts this request.
The request's promise will reject with an up.AbortError
.
let request = await up.request('/path')
try {
let response = await request('/path')
} catch (result) {
if (result instanceof up.AbortError) {
console.log('Request was aborted.')
}
}
request.abort()
A message describing the reason for aborting this request.
If omitted, a generic reason like "Aborted request to GET /path"
will be used.
The reason will be set as the up.AbortError
's message.