Skip to main content

Post

1. JSON data

  • If you want to send json data to the server, just add your javascript object in data property of HttpOptions.


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 access data as shown below.


2. FormData

-if you want to send Formdata then just paas FormData object to body property.