Advertisement
Guest User

fullcode

a guest
May 31st, 2021
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let permissiondata = {deviceId: 1, notificationId: 10};
  2. permissionsDelete(permissiondata,"body").toPromise();
  3.  
  4.  
  5. public permissionsDelete(body: Permission, observe?: 'body', reportProgress?: boolean): Observable<any>;
  6. public permissionsDelete(body: Permission, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
  7. public permissionsDelete(body: Permission, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
  8. public permissionsDelete(body: Permission, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  9.     if (body === null || body === undefined) {
  10.         throw new Error('Required parameter body was null or undefined when calling permissionsDelete.');
  11.     }
  12.  
  13.     let headers = this.defaultHeaders;
  14.  
  15.     // authentication (basicAuth) required
  16.     if (this.configuration.username || this.configuration.password) {
  17.         headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  18.     }
  19.  
  20.     // to determine the Accept header
  21.     let httpHeaderAccepts: string[] = [
  22.         'application/json'
  23.     ];
  24.     const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  25.     if (httpHeaderAcceptSelected != undefined) {
  26.         headers = headers.set('Accept', httpHeaderAcceptSelected);
  27.     }
  28.  
  29.     // to determine the Content-Type header
  30.     const consumes: string[] = [
  31.         'application/json'
  32.     ];
  33.     const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  34.     if (httpContentTypeSelected != undefined) {
  35.         headers = headers.set('Content-Type', httpContentTypeSelected);
  36.     }
  37.  
  38.     return this.httpClient.delete<any>(`${this.basePath}/permissions`,
  39.         {
  40.             withCredentials: this.configuration.withCredentials,
  41.             headers: headers,
  42.             observe: observe,
  43.             reportProgress: reportProgress
  44.         }
  45.     );
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement