Question · JavaScript and React course · Module 11: Data Fetching and APIs
POST Request Configuration with fetch
Which fetch configuration property is used to pass data in JSON format as the body of a POST request?
Answer options
- method: 'POST'
- signal: controller.signal
- headers: { 'Content-Type': 'application/json' }
- body: JSON.stringify(data)
You can check the correct answer by solving this task in the CodeWorlds game.