Some more (curl) examples for the docs #97

Closed
opened 2025-08-08 09:18:08 +00:00 by mih · 2 comments
mih commented 2025-08-08 09:18:08 +00:00 (Migrated from github.com)

When trying this software out, it would be nice to cut down the time needed to spend reading documentation of other software. A few curl-based examples would help, I think.

For example, I am struggling to put together a TTL submission. I was thinking this should do (given the docs):

curl -s -X POST -H "X-DumpThings-Token:..." 'https://<host>/api/2025-protected/record/Person?format=ttl' -H "Content-Type: text/turtle" -d @test.ttl

where test.ttl contains a document.

However, the response to this call is

{"detail":"Conversion error: Conversion Format.ttl -> Format.json. Error: [Errno 2] No such file or directory: '/home/@prefix trr379dfgsurvey:<continuing the content of the TTL document>
When trying this software out, it would be nice to cut down the time needed to spend reading documentation of other software. A few `curl`-based examples would help, I think. For example, I am struggling to put together a TTL submission. I was thinking this should do (given the docs): ``` curl -s -X POST -H "X-DumpThings-Token:..." 'https://<host>/api/2025-protected/record/Person?format=ttl' -H "Content-Type: text/turtle" -d @test.ttl ``` where `test.ttl` contains a document. However, the response to this call is ``` {"detail":"Conversion error: Conversion Format.ttl -> Format.json. Error: [Errno 2] No such file or directory: '/home/@prefix trr379dfgsurvey:<continuing the content of the TTL document> ```
mslw commented 2025-08-08 09:45:48 +00:00 (Migrated from github.com)

I agree that the examples could be useful. Speaking of reading documentation of other software - I suppose it would be enough in your example to use --data-binary instead of -d / --data because the latter strips newlines, which are syntactic in ttl: https://curl.se/docs/manpage.html#--data-binary

I agree that the examples could be useful. Speaking of reading documentation of other software - I suppose it would be enough in your example to use `--data-binary` instead of `-d / --data` because the latter strips newlines, which are syntactic in ttl: https://curl.se/docs/manpage.html#--data-binary
Owner

I am closing this after a long time. The need has intensified and expressed in #214

I am closing this after a long time. The need has intensified and expressed in #214
mih closed this issue 2026-06-25 06:30:10 +00:00
Sign in to join this conversation.
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
orinoco/dump-things-service#97
No description provided.