Skip to main content

WebRemote

Extends

Constructors

new WebRemote()

new WebRemote(
connector,
logger,
options?): WebRemote

Parameters

ParameterTypeDefault value
connectorRemoteConnectorundefined
loggerILoggerDEFAULT_REMOTE_LOGGER
options?Partial<AbstractRemoteOptions>undefined

Returns

WebRemote

Overrides

AbstractRemote.constructor

Accessors

fetch

get fetch(): (input, init?) => Promise<Response>(input, init?) => Promise<Response>(input, init?) => Promise<Response>

Returns

Function

a fetch implementation (function) which can be called to perform fetch requests

MDN Reference

Parameters
ParameterType
inputURL | RequestInfo
init?RequestInit
Returns

Promise<Response>

MDN Reference

Parameters
ParameterType
inputURL | RequestInfo
init?RequestInit
Returns

Promise<Response>

Parameters
ParameterType
inputstring | URL | Request
init?RequestInit
Returns

Promise<Response>

Methods

get()

get(path, headers?): Promise<any>

Parameters

ParameterType
pathstring
headers?Record<string, string>

Returns

Promise<any>

Inherited from

AbstractRemote.get


getBSON()

getBSON(): Promise<typeof BSON>

Provides a BSON implementation. The import nature of this varies depending on the platform

Returns

Promise<typeof BSON>

Overrides

AbstractRemote.getBSON


getCredentials()

getCredentials(): Promise<null | PowerSyncCredentials>

Returns

Promise<null | PowerSyncCredentials>

Inherited from

AbstractRemote.getCredentials


getUserAgent()

getUserAgent(): string

Returns

string

Overrides

AbstractRemote.getUserAgent


post()

post(
path,
data,
headers?): Promise<any>

Parameters

ParameterType
pathstring
dataany
headers?Record<string, string>

Returns

Promise<any>

Inherited from

AbstractRemote.post


postStream()

postStream(options): Promise<DataStream<StreamingSyncLine>>

Connects to the sync/stream http endpoint

Parameters

ParameterType
optionsSyncStreamOptions

Returns

Promise<DataStream<StreamingSyncLine>>

Inherited from

AbstractRemote.postStream


postStreaming()

postStreaming(
path,
data,
headers?,
signal?): Promise<any>

Parameters

ParameterType
pathstring
dataany
headers?Record<string, string>
signal?AbortSignal

Returns

Promise<any>

Inherited from

AbstractRemote.postStreaming


socketStream()

socketStream(options): Promise<DataStream<StreamingSyncLine>>

Connects to the sync/stream websocket endpoint

Parameters

ParameterType
optionsSyncStreamOptions

Returns

Promise<DataStream<StreamingSyncLine>>

Inherited from

AbstractRemote.socketStream