Class: FNetwork
Defined in: submodules/univer/packages/network/src/facade/f-network.ts:22
FBase
is a base class for all facade classes.
It provides a way to extend classes with static and instance methods.
The _initialize
as a special method that will be called after the constructor. You should never call it directly.
Extends
Constructors
new FNetwork()
new FNetwork(_injector, _httpService): FNetwork
Defined in: submodules/univer/packages/network/src/facade/f-network.ts:23
Parameters
Parameter | Type |
---|---|
_injector | Injector |
_httpService | HTTPService |
Returns
Overrides
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | FBase ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:96 |
_httpService | readonly | HTTPService | undefined | - | submodules/univer/packages/network/src/facade/f-network.ts:25 |
_injector | readonly | Injector | undefined | - | submodules/univer/packages/network/src/facade/f-network.ts:24 |
Methods
delete()
delete<T>(url, params?): Promise<HTTPResponse<T>>
Defined in: submodules/univer/packages/network/src/facade/f-network.ts:66
Send DELETE request to the server.
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type | Description |
---|---|---|
url | string | The requested URL |
params ? | IRequestParams | Query parameters |
Returns
Promise
<HTTPResponse
<T
>>
Network response
dispose()
dispose(): void
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:109
Returns
void
Inherited from
disposeWithMe()
disposeWithMe(disposable): IDisposable
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
ensureNotDisposed()
protected ensureNotDisposed(): void
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103
Returns
void
Inherited from
get()
get<T>(url, params?): Promise<HTTPResponse<T>>
Defined in: submodules/univer/packages/network/src/facade/f-network.ts:36
Send GET request to the server.
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type | Description |
---|---|---|
url | string | The requested URL |
params ? | IRequestParams | Query parameters |
Returns
Promise
<HTTPResponse
<T
>>
Network response
getSSE()
getSSE<T>(
method,
url,
params?): Observable<HTTPEvent<T>>
Defined in: submodules/univer/packages/network/src/facade/f-network.ts:88
Request for a stream of server-sent events. Instead of a single response, the server sends a stream of responses,
Univer wraps the stream in an Observable
which you can call subscribe
on.
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type | Description |
---|---|---|
method | HTTPRequestMethod | HTTP request method |
url | string | The requested URL |
params ? | IPostRequestParams | Query parameters |
Returns
Observable
<HTTPEvent
<T
>>
An observable that emits the network response
patch()
patch<T>(url, params?): Promise<HTTPResponse<T>>
Defined in: submodules/univer/packages/network/src/facade/f-network.ts:76
Send PATCH request to the server.
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type | Description |
---|---|---|
url | string | The requested URL |
params ? | IPostRequestParams | Query parameters |
Returns
Promise
<HTTPResponse
<T
>>
Network response
post()
post<T>(url, params?): Promise<HTTPResponse<T>>
Defined in: submodules/univer/packages/network/src/facade/f-network.ts:46
Send POST request to the server.
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type | Description |
---|---|---|
url | string | The requested URL |
params ? | IPostRequestParams | Query parameters |
Returns
Promise
<HTTPResponse
<T
>>
Network response
put()
put<T>(url, params?): Promise<HTTPResponse<T>>
Defined in: submodules/univer/packages/network/src/facade/f-network.ts:56
Send PUT request to the server.
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type | Description |
---|---|---|
url | string | The requested URL |
params ? | IPostRequestParams | Query parameters |
Returns
Promise
<HTTPResponse
<T
>>
Network response
extend()
static extend(source): void
Defined in: submodules/univer/packages/core/src/facade/f-base.ts:26
Parameters
Parameter | Type |
---|---|
source | any |
Returns
void