Class: HTTPService
Defined in: submodules/univer/packages/network/src/services/http/http.service.ts:74
This service provides http request methods and allows to register http interceptors.
You can use interceptors to:
- modify requests (headers included) before they are sent, or modify responses before they are returned to the caller.
- threshold, logging, caching, etc.
- authentication, authorization, etc.
Extends
Constructors
new HTTPService()
new HTTPService(_http): HTTPService
Defined in: submodules/univer/packages/network/src/services/http/http.service.ts:80
Parameters
Parameter | Type |
---|---|
_http | IHTTPImplementation |
Returns
Overrides
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:96 |
Methods
delete()
delete<T>(url, params?): Promise<HTTPEvent<T>>
Defined in: submodules/univer/packages/network/src/services/http/http.service.ts:115
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
url | string |
params ? | IRequestParams |
Returns
Promise
<HTTPEvent
<T
>>
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<HTTPEvent<T>>
Defined in: submodules/univer/packages/network/src/services/http/http.service.ts:103
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
url | string |
params ? | IRequestParams |
Returns
Promise
<HTTPEvent
<T
>>
getSSE()
getSSE<T>(
method,
url,
_params?): Observable<HTTPEvent<T>>
Defined in: submodules/univer/packages/network/src/services/http/http.service.ts:123
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
method | HTTPRequestMethod |
url | string |
_params ? | IPostRequestParams |
Returns
Observable
<HTTPEvent
<T
>>
patch()
patch<T>(url, params?): Promise<HTTPEvent<T>>
Defined in: submodules/univer/packages/network/src/services/http/http.service.ts:119
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
url | string |
params ? | IPostRequestParams |
Returns
Promise
<HTTPEvent
<T
>>
post()
post<T>(url, params?): Promise<HTTPEvent<T>>
Defined in: submodules/univer/packages/network/src/services/http/http.service.ts:107
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
url | string |
params ? | IPostRequestParams |
Returns
Promise
<HTTPEvent
<T
>>
put()
put<T>(url, params?): Promise<HTTPEvent<T>>
Defined in: submodules/univer/packages/network/src/services/http/http.service.ts:111
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
url | string |
params ? | IPostRequestParams |
Returns
Promise
<HTTPEvent
<T
>>
registerHTTPInterceptor()
registerHTTPInterceptor(interceptor): IDisposable
Defined in: submodules/univer/packages/network/src/services/http/http.service.ts:90
Register an HTTP interceptor.
Parameters
Parameter | Type | Description |
---|---|---|
interceptor | IHTTPInterceptor | the http interceptor |
Returns
a disposable handler to remove the interceptor