I have these two interfaces
interface Country {
name: string,
flag: string,
code: string,
dialCode: number
}
interface RegisterRequest {
email: string,
name: string,
surname: string,
password: string,
rememberMe: boolean,
country: Country
}
then I have a field
protected form = {} as RegisterRequest;
finally I do
this.http.post('/auth/register', this.form).subscribe(...);
The request body looks like this
{
"name": "John",
"surname": "Doe",
"country": {
"name": "Burundi",
"flag": "