import { Injectable } from '@angular/core' ; import { AppContextService , HttpService } from '@microsoft/windows-admin-center-sdk/angular' ; import { Cim , Http , PowerShell , PowerShellSession } from '@microsoft/windows-admin-center-sdk/core' ; import { AjaxResponse , Observable } from 'rxjs' ; @ Injectable ( ) export class PluginService { constructor ( private appContextService , private http ) { } private buildUrlParams ( ) { let gateway = this . appContextService . gateway . gatewayUrl ; let node = this . appContextService . activeConnection . nodeName ; let url = `${ gateway }/api/nodes/${ node }/features/Sample Uno` ; console . log ( url ) ; return url ; } public getGatewayRestResponse ( ) { let test = this . appContextService . gateway . gatewayUrl ; let callUrl = this . appContextService . activeConnection . nodeName ; return this . appContextService . node . get ( callUrl , 'features/Sample%20Uno' ) . map ( ( response ) => { return response ; } ) ; } }