JSFiddle - React, Tailwind, and code Playground

JavaScript

var data = {
        "description": "posting gist test",
        "public": true,
        "files": {
          "test.json": {
              "content": "{'hello':\n  {'github':\n    {'gist':'api'}}}"
          }
        }
      }
      $.ajax({
        url: 'https://api.github.com/gists',
        type: 'POST',
        dataType: 'json',
        data: JSON.stringify(data)
      })
      .success( function(e) {
        console.log(e);
      })
      .error( function(e) {
        console.warn("gist save error", e);
      });