Skip to content

Commit

Permalink
HTTP запрос выдает статус 403. Либо что-то со мной не так, либо у мен…
Browse files Browse the repository at this point in the history
…я нет разрешения на добавление триплов...
  • Loading branch information
mr7falcon committed May 15, 2019
1 parent 55db8a8 commit 08a63da
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/rdf4j-tests/transactions.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const url = 'https://agentlab.ru/rdf4j-server/repositories/rpo-tests/transactions';

test('adding triples with PUT query and transactions', async () => {
const tID = await fetch(url, {
method: 'POST',
}).then((r) => r.headers.get('Location'));

expect(tID).not.toBe(null);

console.log(tID);

const result = await fetch(tID + '?action=ADD', {
method: 'PUT',
headers: {
'Content-Type': 'text/turtle',
},
body:
'<http://mythology.Greek.org/#Cronus> <http://www.example.org/schemas/relationship/fatherOf> <http://mythology.Greek.org/#Zeus> .',
}).then((r) => r);

console.log(result);
});

0 comments on commit 08a63da

Please sign in to comment.