-
Notifications
You must be signed in to change notification settings - Fork 66
Win8.1 ML7 Roxy rest problem #400
Comments
Looking at it.. |
This has more to do with MarkLogic versus AJAX, and not with Roxy, but have an answer for you anyhow.. Took me a moment to figure out, but the AJAX call you are making sends your data as Form Data, and MarkLogic doesn't treat that as a request body. This is mostly caused by the default value for the AJAX contentType setting:
add |
Thanks for the help. |
Wasn't inserting a document because the call to xdmp:document-insert() was missing from the implementation |
To elaborate on Dave: I suspect you want the JSON object you are passing in as data to be stored as document. You don't need to prefix the property names inside the JSON for that. The 'rs:' prefixes only apply to request parameters, but with the current changes you are passing in the JSON object in its entirety. And I think that is what you want as well. Note though, that the demo:post example function doesn't write anything to the database, it merely replies with some value. You will need to do an For a more complete example of how to build an interactive application on top of the REST api, you might be interested looking at https://github.com/marklogic/slush-marklogic-node |
I have ML7 under windows8.1
Installed Roxy app from dev branch with rest.
And to simplify I removed authentication for 4040.
Rest-ext file is:
Ajax call is:
Uploaded and it always call GET instead of POST. When I removed GET have error missing function GET.
What I'm doing wrong?
The text was updated successfully, but these errors were encountered: