Here is the curl command I'm executing
curl -F "context=<http://example.com>" \
-F "Content-Type=text/plain" \
-F "source=file" \
-F "content=@members.nt;type=text/plain" \
http://localhost:8080/openrdf-workbench/repositories/XXX/add
I'm trying to load openrdf repository. It gives me an error because there is a "<" character at in the value of "context" parameter. How to escape this "<" so curl does not think that I'm trying to load file content into "context" parameter
The error from curl is:
curl: (26) couldn't open file "http://example.com>"
I've tried to escape it with \ and using < and %3C but no luck because as soon as I try to do this then the other end is complaining that it did not get exactly http://example.com
This is what is sent from the browser form
------WebKitFormBoundaryl8CUSIvy5962lwBF
Content-Disposition: form-data; name="baseURI"
------WebKitFormBoundaryl8CUSIvy5962lwBF
Content-Disposition: form-data; name="context"
<http://example.com>
------WebKitFormBoundaryl8CUSIvy5962lwBF
Content-Disposition: form-data; name="Content-Type"
text/plain
------WebKitFormBoundaryl8CUSIvy5962lwBF
Content-Disposition: form-data; name="source"
file
------WebKitFormBoundaryl8CUSIvy5962lwBF
Content-Disposition: form-data; name="content"; filename="members.nt"
Content-Type: application/octet-stream
------WebKitFormBoundaryl8CUSIvy5962lwBF--
Any suggestions ?