Skip to main content

RESTful client

XML
<rest:client url="string" timeout="60" validate="bool">
ixml
<rest:header>string</rest:header>
</rest:client>

<rest:client /> defines a set of dynamically bound RESTful resources based on HTTP/1.1.

Attributes

NameTypeDescriptionDefined By
urlstringURL rest:client
timeoutintTimeout in seconds rest:client
validateboolValidate SSL rest:client

Children

rest:header
XML
<rest:header>string</rest:header>

Examples

XML
<rest:client url="https://api.predic8.de/shop/v2">
<rest:header>
Content-Type: application/json
</rest:header>

<rest:bind var="createProduct" method="POST">/products/</rest:bind>
<rest:bind var="updateProduct" method="PATCH">/products/:id</rest:bind>
<rest:bind var="getProduct" method="GET">/products/:id</rest:bind>
</rest:client>

<call func="createProduct" var="data">
<param>{"name": "Some Fruit", "price": 4.99}</param>
</call>

<call func="updateProduct">
<param var="data.id"/>
<param>{"name": "Wildberries"}</param>
</call>

<call func="getProduct" var="data">
<param var="data.id"/>
</call>

<output>$data.name</output>

<!-- Wildberries -->