Gabinete Digital on work.

This commit is contained in:
Paulo Pinto
2020-08-27 13:02:06 +01:00
parent 0773b074f6
commit 104bb42b1b
10 changed files with 81 additions and 120 deletions
-45
View File
@@ -1,45 +0,0 @@
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { environment } from '../../environments/environment';
import { reject } from 'q';
@Injectable({
providedIn: 'root'
})
export class HttpService {
constructor(private http: HttpClient) {}
/* post(serviceName: string, data: any) {
const headers = new HttpHeaders();
const options = { headers: headers, withCredintials: false };
const url = environment.apiURL + serviceName;
return this.http.post(url, JSON.stringify(data), options);
} */
private API_URL = 'https://gpr-dev-08.gabinetedigital.local/api/v2.0/me/calendarview';
/* loginRequest(username:string, password: string, domain: string){
return new Promise((resolve, reject) => {
var data = {
emusernameail: username,
password: password,
domain: domain
};
this.http.post(this.API_URL, data)
.subscribe(result: any)=> {
resolve(result.json());
},
(error)=>{
reject(error.json());
}
})
} */
/* request(API_URL, { json: true },{username:"tiago.kayaya"}, {password:"tabteste@006"}, {domain:"gabinetedigital.local"} ,(err, res, body) => {
if (err) { return console.log(err); }
console.log(body.url);
console.log(body.explanation);
}); */
}