Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP запрос на добавление трипла выдает статус 403 #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
});