* Serializes and writes a graph to the given uri, and returns the original * (non-serialized) graph. * Usage: * * ``` * ldp.putGraph('https://localhost:8443/contacts/resource1.ttl', graph) * .then(graph => { * // success * }) * ``` * * @param grap
(graph, uri, contentType)
| 194 | * @return {Promise<Graph>} |
| 195 | */ |
| 196 | async putGraph (graph, uri, contentType) { |
| 197 | const content = await serialize(graph, uri, contentType) |
| 198 | const stream = stringToStream(content) |
| 199 | return await this.put(uri, stream, contentType) |
| 200 | } |
| 201 | |
| 202 | isValidRdf (body, requestUri, contentType) { |
| 203 | const resourceGraph = $rdf.graph() |
no test coverage detected