Put
1. JSON data
- If you want to send
jsondata to the server, just add your javascript object in data property ofHttpOptions.
note
whenever users sends the json data to the server using data property of HttpOptions, it will set content-type : application/json header if headers object does not have content-type field.
note
Here, res is just a javascript Response object, so you can also get data as shown below.