[Solved] Multiple parameters as http request Data in angular 4


Just send it as array of object in key value pair like this

CreateMethod(input:HTMLInputElement){ 
  let firstName = {title:input.value} 
  input.value=""; 
  let arrayYouNeedToSend = [{title:input.value}];
  this.http.post(this.url,JSON.stringify(arrayYouNeedToSend))
    .subscribe(response=>{ 
      //firstName.id=response.json().id; this.postvalue.splice(0,0,firstName); console.log(response.json()); 
    })

1

solved Multiple parameters as http request Data in angular 4