Skip to main content

Get

1. JSON data

  • By default when you fetch json data from server, it will be parsed and you will get a javascript object in data property of HpResponse object.


note

Here, res is just a javascript Response object, so you can also parse data as shown below.


2. Text data

  • if you are fetching text data then you just need to set text as responseType and the data property of HpResponse will have text data.


note

Here, res is just a javascript Response object, so you can also parse data as shown below.


3. Blob data

  • To get blob data from response you just need to set blob as responseType and in data property of HpResponse object will have blob data.


note

Here, res is just a javascript Response object, so you can also parse data as shown below.