Using RESTXQ in an application for the first time.  I expected this
function to have the MIME type application/json:

declare

  %rest:path("/api/abbott-smith/index")

  %rest:GET

  %rest:produces("application/json")

  function as:index()

{

  array { $as:abbott-smith/*:entry ! @lemma ! string() }

  ! serialize(., map {'method' : 'json'})

};


But both POSTMAN and WADL give me application/xml as the mime type:


<wadl:resource path="/api/abbott-smith/index">
  <wadl:method name="GET">
    <wadl:request/>
    <wadl:response>
    <wadl:representation mediaType="application/xml"/>
    </wadl:response>
  </wadl:method>
</wadl:resource>

What am I doing wrong?


Jonathan

Reply via email to