Axios basic request

PHOTO EMBED

Wed Feb 16 2022 07:26:38 GMT+0000 (UTC)

Saved by @naisargchauhan ##javascript ##api

const options = {
    method: 'post',
    url: 'https://jsonplaceholder.typicode.com/todos',
    data: {
      title: 'Hello World'
    }
  };

  axios(options).then(res => showOutput(res));
}
content_copyCOPY

https://github.com/bradtraversy/axios-crash/blob/master/main.js