What I would like to do is this curl operation in node.js.
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 -
Suggestions are appreciated.
Use request. request is the de-facto standard way to make HTTP requests from node.js. It’s a thin abstraction on top of
http.request