Home Reference Source
import BeaconableRequest from '~/models/Request/BeaconableRequest.js'
public class | source

BeaconableRequest

Extends:

Request → BeaconableRequest

A request with beacon flag. Do note: very few features are supported. Additionally the HTTPMethod is always POST.

Constructor Summary

Public Constructor
public

Same constructor as Request

Method Summary

Public Methods
public

async run(o: Object)

Runs optionally with beacon

Inherited Summary

From class Request
protected
public

cancel()

Cancels the request.

public

format(data: Object): Object

Formats the request object and returns an object of Request<T>'s T.

public

async run(o: Object): Promise

Performs the request

Public Constructors

public constructor(opts: Object) source

Same constructor as Request

Override:

Request#constructor

Params:

NameTypeAttributeDescription
opts Object

Public Methods

public async run(o: Object) source

Runs optionally with beacon

Override:

Request#run

Params:

NameTypeAttributeDescription
o Object

inherits opts from Request

o.useBeacon boolean

Uses navigator.sendBeacon