I was reading the MarkLogic resource extension documentation (https://docs.marklogic.com/guide/rest-dev/extensions#id_21018) and I have a question.
In the table listing the parameters it states that the context parameter holds input information such as input type and URI. However, I have set up a a resource extension that should accept multiple documents and receive the content-type
, but not the URI in the $context
variable (I printed the $context
variable to log). I used the following syntax in my rest request:
--BOUNDARY
Content-Type: application/xml
Content-Disposition: attachment; filename"test1.xml
<data>testdata</testdata>
--BOUNDARY--
with a header of
Content-Type=multipart/mixed; boundary=BOUNDARY
Why does my URI does not show up here?
Interestingly, note that the Context Map Keys section (which is referred from the table with the context parameters description) does not list URI as a possible key. Furthermore, in the JavaScript example in the resource section the URI is constructed via an explicit url-parameter (i.e. myresource?basename=test.xml
). This seems to suggest that the initial documentation (stating that you can get the URI from the $context
) is in error. Is this the case?