We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 831ee33 + 9e3567e commit 14f9f3dCopy full SHA for 14f9f3d
sourcePane.js
@@ -51,10 +51,17 @@ module.exports = {
51
throw new Error(msg)
52
}
53
54
+ function contentForNew (contentType) {
55
+ let content = '\n'
56
+ if (contentType.includes('json')) content = '{}\n'
57
+ else if (contentType.includes('rdf+xml')) content = '<rdf:RDF\n xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">\n\n</rdf:RDF>'
58
+ return content
59
+ }
60
+
61
return new Promise(function (resolve, reject) {
62
kb.fetcher
63
.webOperation('PUT', newInstance.uri, {
- data: contentType.includes('json') ? '{}\n' : '\n',
64
+ data: contentForNew(contentType),
65
contentType: contentType
66
})
67
.then(
0 commit comments