Put in order · JavaScript and React course · Module 11: Data Fetching and APIs

fetch Syntax with POST Method

Arrange the syntax of a fetch call with the POST method and Content-Type header:

Items to put in order

  • { method: 'POST',
  • headers: { 'Content-Type': 'application/json' },
  • body: JSON.stringify(data) })
  • fetch(url,

You can check the correct answer by solving this task in the CodeWorlds game.