Skip to content
Discussion options

You must be logged in to vote

I have finally resolved the issue using 'Content-Type': 'application/x-www-form-urlencoded'

AddNewData(model:any){ let body = new URLSearchParams(); body.set('Name', model.Name); body.set('Message', model.Message); let headers=new HttpHeaders({ 'Content-Type': 'application/x-www-form-urlencoded' }) let options = { headers: headers}; return this.http.post('https://localhost:44300/workflows/Invoke?token=Generated Token',body,options) .subscribe({ next: (response:any) => { console.log("success") }, error: (err: HttpErrorResponse) => { console.log(err.message) }}) ;

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by muobeidat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant