Skip to content

Commit 08a63da

Browse files
committed
HTTP запрос выдает статус 403. Либо что-то со мной не так, либо у меня нет разрешения на добавление триплов...
1 parent 55db8a8 commit 08a63da

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
const url = 'https://agentlab.ru/rdf4j-server/repositories/rpo-tests/transactions';
2+
3+
test('adding triples with PUT query and transactions', async () => {
4+
const tID = await fetch(url, {
5+
method: 'POST',
6+
}).then((r) => r.headers.get('Location'));
7+
8+
expect(tID).not.toBe(null);
9+
10+
console.log(tID);
11+
12+
const result = await fetch(tID + '?action=ADD', {
13+
method: 'PUT',
14+
headers: {
15+
'Content-Type': 'text/turtle',
16+
},
17+
body:
18+
'<http://mythology.Greek.org/#Cronus> <http://www.example.org/schemas/relationship/fatherOf> <http://mythology.Greek.org/#Zeus> .',
19+
}).then((r) => r);
20+
21+
console.log(result);
22+
});

0 commit comments

Comments
 (0)