Question
In this exercise, we access some properties of the Response
object, such as the ok
property. What other properties are part of the Response
object?
Answer
A Response
object has multiple properties in addition to the ok
property. Some of them are as follows:
headers
- A Headers
object that is associated with the response.
redirected
- A property that tells whether the response is the result of a redirect.
status
- The status code of the response.
type
- The type of the response.
url
- The URL of the response.
For a full list of the properties and methods, feel free to check out the documentation on MDN.