I need assistance sending a POST request using parameters in the following format:
http://127.0.0.1:9000/api?command={"command":"value","params":{"key":"value","key":"value","key":"value","key":value,}}
I attempted to do this but encountered an issue:
let command: HttpParams = new HttpParams();
let params: HttpParams = new HttpParams();
command = command.append('command', 'value');
params = params.append('key', value);
params = params.append('key', value);
params = params.append('key', value);
params = params.append('key', value);
command = command.append('params', params.toString());
this.httpClient.post('/api?', null, {
params: command
});
An error occurred: 500 (Internal Server Error)