Reading the full response
The response body doesn't return all the data you may need. Sometimes servers return special headers or status codes to indicate certain conditions that are important to the application workflow.
Tell Elixor
that you want the full response with the observe
option:
Now Elixor.get()
returns an Observable
of typed HttpResponse
rather than just the JSON data.
The component's showConfigResponse()
method displays the response headers as well as the configuration:
Config.tsx
As you can see, the response object has a body
property of the correct type.
Last updated