Hi Justin,

I'm looking at the REST API code that calls xdmp:multipart-decode(), and I 
suspect this might help decode the binary payload I'm getting (having taken 
Geert's suggestion to submit the request as multipart/mixed), but how would one 
discover the correct boundary value? It seems you would have to decode the 
binary into text and parse it manually?

-Will



> On May 17, 2016, at 1:28 PM, Justin Makeig <justin.mak...@marklogic.com> 
> wrote:
> 
> The REST Client API uses HTTP multipart to do batch inserts 
> <http://docs.marklogic.com/guide/rest-dev/bulk>. You can do the same from 
> your own HTTP app server too. Take a look at 
> <http://docs.marklogic.com/xdmp:multipart-decode>.
> 
> Justin
> 
> --
> Justin Makeig
> Director, Product Management
> MarkLogic
> 
> 
>> On May 17, 2016, at 11:09 AM, Will Thompson <wthomp...@oconnors.com> wrote:
>> 
>> Is there a recommended method of posting multiple documents to a ML endpoint 
>> in one request? Maybe this is a more general HTTP question, but I have tried 
>> several permutations of curl options, and unfortunately the only one that 
>> works on the ML side involves joining the documents together into a single 
>> payload with multiple root elements:
>> 
>> curl -u user:pass -k -X POST \
>> -H "Content-Type: text/xml" \
>> -d '<Document>Document 1</Document><Document>Document 2</Document>' \
>> https://localhost:1234/my-endpoint
>> 
>> And in XQuery, the sequence of <Document> elements is retrieved by 
>> xdmp:get-request-body()/node(). But this can't be right, can it?
>> 
>> -Will
>> _______________________________________________
>> General mailing list
>> General@developer.marklogic.com
>> Manage your subscription at: 
>> http://developer.marklogic.com/mailman/listinfo/general
> 
> 
> 
> 
> 
> _______________________________________________
> General mailing list
> General@developer.marklogic.com
> Manage your subscription at: 
> http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to