feat: Ajout d'une tâche
This commit is contained in:
@@ -5,7 +5,13 @@ import { Observable } from 'rxjs';
|
||||
@Service()
|
||||
export class BaseService {
|
||||
private readonly http: HttpClient = inject(HttpClient);
|
||||
protected get<T>(url: string):Observable<T> {
|
||||
return this.http.get<T>(url);
|
||||
private readonly baseAddress: string = "http://127.0.0.1:8080/";
|
||||
|
||||
protected get<T>(url: string): Observable<T> {
|
||||
return this.http.get<T>(this.baseAddress + url);
|
||||
}
|
||||
|
||||
protected post<T>(url: string, body: T): Observable<T> {
|
||||
return this.http.post<T>(this.baseAddress + url, body);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user