BackendService
injectable
Service for http communication with the yuuvis Momentum backend. Apps should use this service to communicate with the backend instead of default httpClient because required headers are managed and apps do not have to care about preqrequisits.
Methods
Section titled “Methods”Batch service
batch(requests: literal type[]): Observable<{}>Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| requests | literal type[] |
delete
Section titled “delete”Wrapped HTTP DELETE method
delete(uri: string, base: string, requestOptions: HttpDeleteOptions): Observable<any>Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| uri | string | |
| base | string | |
| requestOptions | HttpDeleteOptions |
download
Section titled “download”download(uri: string, filename: string): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| uri | string | |
| filename | string |
Wrapped HTTP GET method
get(uri: string, base: string, requestOptions: HttpOptions): Observable<any>Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| uri | string | |
| base | string | |
| requestOptions | HttpOptions |
getApiBase
Section titled “getApiBase”Gets the base URI for an API endpoint base URI for the web API
getApiBase(api: string, origin: ): stringArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| api | string | |
| origin | “ |
getAuthHeaders
Section titled “getAuthHeaders”OpenIdConnect authorization headers
getAuthHeaders(): anyWrapped HTTP PATCH method
patch(uri: string, data: any, base: string, requestOptions: HttpOptions): Observable<any>Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| uri | string | |
| data | any | |
| base | string | |
| requestOptions | HttpOptions |
Wrapped HTTP POST method
post(uri: string, data: any, base: string, requestOptions: HttpOptions): Observable<any>Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| uri | string | |
| data | any | |
| base | string | |
| requestOptions | HttpOptions |
postMultiPart
Section titled “postMultiPart”Performs a multipart form data POST request.
postMultiPart(uri: string, formData: FormData, base: string, requestOptions: HttpOptions): Observable<any>Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| uri | string | |
| formData | FormData | |
| base | string | |
| requestOptions | HttpOptions |
Wrapped HTTP PUT method
put(uri: string, data: any, base: string, requestOptions: HttpOptions): Observable<any>Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| uri | string | |
| data | any | |
| base | string | |
| requestOptions | HttpOptions |
setHeader
Section titled “setHeader”Add a new header. will remove the header
setHeader(key: string, value: string): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| key | string | |
| value | string |