How to post json to url and recieve json resonse using ionic4 angular?

Hi,

I am getting into interaction with API’s using ionic4 angular and I am trying to post json to an API url and receive the json response to display or store in firebase. Is there a resource or sample code or example anyone can point me to on how one can post json key-value pairs to a URL and receive the json response?

Thanks

I would emulate the good old Tour of Heroes.

I would also suggest ignoring any other suggestions that involve any manual JSON stringification or setting of Content-Type. They aren’t necessary, will cause you problems if you do them wrong, and will confuse readers of your code (including you in a month or so).

1 Like

Thanks @rapropos will give it a try. fingers crossed