FrontEnd.ro logo
Use The Platform #2

try {
  const response = await fetch('https://example.com/movies', {
    headers: new Headers({
      'content-type': 'application/json',
    }),
    method: 'POST',
    body: JSON.stringify(body),
  });

  const jsonResponse = await response.json();
} catch (err) {
  // Handle error
}