title: how to do this curl operation in node.js
body: <p>What I would like to do is this curl operation in <code>node.js</code>.</p>
  
  <pre><code>curl -XPOST localhost:12060/repository/schema/fieldType -H 'Content-Type: application/json' -d '
  {
    action: "create",
    fieldType: {
      name: "n$name",
      valueType: { primitive: "STRING" },
      scope: "versioned",
      namespaces: { "my.demo": "n" }
    }
  }' -D -
  </code></pre>
  
  <p>Suggestions are appreciated.</p>