Erik -

No major issues. It was just a little wonky doing this for a resource
service extension that expects XML. Since the XML is serialized as text,
http-put defaults to text content type, so I had to add this to the header:

<headers>
  <content-type>application/xquery</content-type>
    </headers>

-Will



On 7/29/13 8:56 PM, "Erik Hennum" <[email protected]> wrote:

>Hi, Will:
>
>You're right -- at present, the caller to xdmp:http-post() and
>xdmp:http-put() has to serialize the XML.
>
>Have you run into issues using xdmp:quote() to serialize?
>
>
>Erik Hennum
>________________________________________
>From: [email protected]
>[[email protected]] on behalf of Will Thompson
>[[email protected]]
>Sent: Monday, July 29, 2013 5:29 PM
>To: MarkLogic Discussion
>Subject: [MarkLogic Dev General] xdmp:http-put to REST Client API
>document      management endpoint
>
>Is there another way to do this, or do I have to use xdmp:quote?
>
>xdmp:http-put(
>  'https://localhost:8012/v1/documents?uri=/mydoc.xml',
>  <options xmlns="xdmp:http">
>    <authentication method="digest">
>      <username>user</username>
>      <password>pass</password>
>    </authentication>
>    <data>{ xdmp:quote(<doc>My document</doc>) }</data>
>  </options>
>)
>
>
>0Will
>
>_______________________________________________
>General mailing list
>[email protected]
>http://developer.marklogic.com/mailman/listinfo/general
>_______________________________________________
>General mailing list
>[email protected]
>http://developer.marklogic.com/mailman/listinfo/general
>

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to