linkeddata / rdflib.js

Linked Data API for JavaScript
http://linkeddata.github.io/rdflib.js/doc/
Other
566 stars 146 forks source link

createContainer cannot be used with data parameter #266

Open NoelDeMartin opened 6 years ago

NoelDeMartin commented 6 years ago

The createContainer method, found in src/fetcher.js, has a third optional argument used to pass folder metadata. But that argument cannot be used, since doing it causes an error to be thrown when webOperation is called without a contentType option.

I guess this could be fixed by adding options.contentType = 'text/turtle' on this line: https://github.com/linkeddata/rdflib.js/blob/master/src/fetcher.js#L1127

But I'm not familiar enough with this library to be sure that it won't break anything.

rodant commented 5 years ago

In my opinion there is a mismatch between createContainer setting 'content-type': ''text/turtle' and webOperatiton expecting the property 'contentType'.