Features: p:http-request

http-request-071 (AB)

Tests p:http-request: Testing parameter 'override-content-type'.

Test is expected to fail with with one of these error codes: err:XC0030, err:XD0049.

The pipeline

<p:declare-step xmlns:err="http://www.w3.org/ns/xproc-error"
                xmlns:p="http://www.w3.org/ns/xproc"
                xmlns:t="http://xproc.org/ns/testsuite/3.0" version="3.0">
   <p:option name="WHOST"
             select="'http://localhost:8246'" static="true"/>
   <p:output port="result"/>
   <p:http-request href="{$WHOST}/service/echo"
                   method="post"
                   parameters="map{'override-content-type' : 'application/xml'}">
      <p:with-input>
         <p:inline content-type="text/plain">{{"key" : "value"}}</p:inline>
      </p:with-input>
   </p:http-request>
</p:declare-step>

Revision history

23 May 2025, Norm Tovey-Walsh
Added static options for web server host and port.
14 Jan 2020, Achim Berndzen
Added new tests for p:http-request.