[MarkLogic Dev General] How to get request headers for xdmp:http-get request

Danny Sokolsky Danny.Sokolsky at marklogic.com
Thu Sep 30 16:06:37 PDT 2010


Hi Steve,

The first node returned from xdmp:http-get is the headers.  The second node is the response from the query.  For example, for a boo.xqy with a body:

 "boo"

:

xquery version "1.0-ml";

xdmp:http-get("http://localhost:8020/boo.xqy",
  <options xmlns="xdmp:http">
    <authentication>
        <username>admin</username>
        <password>password</password>
     </authentication>
  </options>)
=>
<response xmlns="xdmp:http">
  <code>200</code>
  <message>OK</message>
  <headers>
    <server>MarkLogic</server>
    <content-type>text/plain; charset=UTF-8</content-type>
    <content-length>3</content-length>
    <connection>close</connection>
  </headers>
</response>
boo

-Danny

From: general-bounces at developer.marklogic.com [mailto:general-bounces at developer.marklogic.com] On Behalf Of spig
Sent: Thursday, September 30, 2010 3:54 PM
To: general at developer.marklogic.com
Subject: [MarkLogic Dev General] How to get request headers for xdmp:http-get request

Is there a way to see what request headers are being sent by xdmp:http-get requests?


--
Steve Spigarelli


More information about the General mailing list