import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { UserInput } from 'src/app/models/userInput';
import { environment } from 'src/environments/environment';

@Injectable({
  providedIn: 'root'
})
export class AutoAansturingService {
  url = environment.url;
  constructor(private httpClient: HttpClient) { }
  postUserInput(userInput: UserInput): Observable<UserInput> {
    let headers = new HttpHeaders();
    headers = headers.set('Content-Type', 'application/json; charset=utf-8');

    return this.httpClient.post<UserInput>(this.url + '/UserInput/addUserInput', userInput, {headers: headers});
  }
}
