JSFiddle - React, Tailwind, and code Playground

by Nick Hulea

JavaScript

// Request API.
axios
  .post('https://strapi.hulea.org/auth/local/register', {
    username: 'Strapi user',
    email: '[email protected]',
    password: 'strapiPassword'
  })
  .then(response => {
    // Handle success.
    console.log('Well done!');
    console.log('User profile', response.data.user);
    console.log('User token', response.data.jwt);
  })
  .catch(error => {
    // Handle error.
    console.log('An error occurred:', error);
  });