I have an Angular class defined with a property (timeout) of type 'number':
export class EngineSpec {
name: string;
base_url: string;
version: string;
timeout: number;
tls: boolean = false;
user_agent: string;
}
However, when I http.post an instance of this class, the property is sent as a string:
{"tls":false,
"name":"local-vm",
"base_url":"http://localhost:2367",
"version":"1.3",
"timeout":"60"
}
Any ideas why a number is getting sent as a JSON string?