student.ts
...
public _status: string;
...
get status() {
return this._status;
}
...
student.pack.ts
...
post(student: Person): Observable<Student> {
const postPersonURL = 'http://localhost:8080/api/persons';
return this.httpClient.post<Person>(postPersonURL, student);
}
...
JSON sent to server-side
{
...
"_status": "Valid",
...
}
Why is the private _status being sent instead of status?