ldkit 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,11 +34,13 @@ export class QueryEngine {
34
34
  const fetchFn = this.getFetch(context);
35
35
  return await fetchFn(endpoint, {
36
36
  method: "POST",
37
- body: query,
38
37
  headers: {
39
- "content-type": "application/sparql-query",
40
38
  "accept": "application/sparql-results+json",
39
+ "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
41
40
  },
41
+ body: new URLSearchParams({
42
+ query,
43
+ }),
42
44
  });
43
45
  }
44
46
  async queryBindings(query, context) {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "main": "./script/mod.js",
4
4
  "types": "./types/mod.d.ts",
5
5
  "name": "ldkit",
6
- "version": "0.5.0",
6
+ "version": "0.5.1",
7
7
  "description": "LDkit, a Linked Data query toolkit for TypeScript developers",
8
8
  "homepage": "https://ldkit.io",
9
9
  "author": "Karel Klima <karelklima@gmail.com> (https://karelklima.com)",
@@ -37,11 +37,13 @@ class QueryEngine {
37
37
  const fetchFn = this.getFetch(context);
38
38
  return await fetchFn(endpoint, {
39
39
  method: "POST",
40
- body: query,
41
40
  headers: {
42
- "content-type": "application/sparql-query",
43
41
  "accept": "application/sparql-results+json",
42
+ "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
44
43
  },
44
+ body: new URLSearchParams({
45
+ query,
46
+ }),
45
47
  });
46
48
  }
47
49
  async queryBindings(query, context) {
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  object: "schema:object";
3
3
  value: "schema:value";
4
+ query: "schema:query";
4
5
  error: "schema:error";
5
6
  map: "schema:map";
6
7
  Property: "schema:Property";
@@ -2327,7 +2328,6 @@ declare const _default: {
2327
2328
  purchaseDate: "schema:purchaseDate";
2328
2329
  qualifications: "schema:qualifications";
2329
2330
  quarantineGuidelines: "schema:quarantineGuidelines";
2330
- query: "schema:query";
2331
2331
  quest: "schema:quest";
2332
2332
  question: "schema:question";
2333
2333
  rangeIncludes: "schema:rangeIncludes";