forked from rdf-ext/sparql-http-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimpleClient.js
More file actions
31 lines (29 loc) · 1.02 KB
/
SimpleClient.js
File metadata and controls
31 lines (29 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const Endpoint = require('./Endpoint')
const RawQuery = require('./RawQuery')
const BaseClient = require('./BaseClient')
/**
* A basic client implementation which uses RawQuery and no Store
*
* @property {RawQuery} query
*/
class SimpleClient extends BaseClient {
/**
* @param {Object} options
* @param {string} options.endpointUrl SPARQL Query endpoint URL
* @param {fetch} [options.fetch=nodeify-fetch] fetch implementation
* @param {HeadersInit} [options.headers] HTTP headers to send with every endpoint request
* @param {string} [options.password] password used for basic authentication
* @param {string} [options.storeUrl] Graph Store URL
* @param {string} [options.updateUrl] SPARQL Update endpoint URL
* @param {string} [options.user] user used for basic authentication
* @param {factory} [options.factory] RDF/JS DataFactory
*/
constructor (options) {
super({
endpoint: new Endpoint(options),
factory: options.factory,
Query: RawQuery
})
}
}
module.exports = SimpleClient