import { HttpHeaders } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { environment } from '../../../environments/environment'; import { RegisterModel } from '../../models/registers/RegisterModel'; import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service'; @Injectable() export class RegistryService { private actionUrl: string; private headers: HttpHeaders; constructor(private http: BaseHttpService) { this.actionUrl = environment.Server + 'registries/'; this.headers = new HttpHeaders(); this.headers = this.headers.set('Content-Type', 'application/json'); this.headers = this.headers.set('Accept', 'application/json'); } create(registerModel: RegisterModel): Observable { return this.http.post(this.actionUrl + 'create', registerModel, { headers: this.headers }); } }