Reputation: 11
I'm practicing to load a simple XML document (I name it one.xml) with content:
<one>
<child>The noble Brutus has told Caesar was ambitious</child>
</one>
to MarkLogic DB.
I run curl tool (Windows cmd) at one.xml's directory and type the following command line:
curl --anyauth --user user:password -x put -d@"./one.xml" ^
-h "Content-type: application/xml" ^
"http://localhost:8000/LATEST/documents?uri=/xml/one.xml"
So if the request succeeds, the service returns status 201 (Document Created). But nothing happened. Instead, I received the results of the "curl --help" command.
I folllow the instructions of MarkLogic website. Link: https://docs.marklogic.com/8.0/guide/rest-dev/intro#id_97899
Scroll down to the Getting Started with the MarkLogic REST API article. I am stuck at Load Documents Into the Database
P/S: The curl command line in the MarkLogic website use Unix syntax, so I changed it to Windows syntax following this link https://docs.marklogic.com/8.0/guide/rest-dev/intro#id_75672
I think this is a problem. Please help me
Upvotes: 1
Views: 79
Reputation: 20414
You mistyped the -X
parameter, it must be upper-case X. Lower-case x parameter is used for something else..
HTH!
Upvotes: 2