mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
add show total users in rocket chat server
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { HttpClient, HttpHeaderResponse, HttpHeaders } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class HttpService {
|
||||
|
||||
constructor(private http:HttpClient) { }
|
||||
|
||||
post(serviceName:string, data:any){
|
||||
const headers = new HttpHeaders();
|
||||
const options = {header: headers, withCredentials: false};
|
||||
const url = environment.apiChatUrl+serviceName;
|
||||
const body = {"user": "admin","password": "tabteste@006"};
|
||||
|
||||
return this.http.post(url, /* JSON.stringify( */data/* ), options */)
|
||||
}
|
||||
|
||||
get(serviceName:string, options:any){
|
||||
const url = environment.apiChatUrl+serviceName;
|
||||
return this.http.get(url, options);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user