| Namespace | http://www.mulesoft.org/schema/mule/rest |
| Schema Location | http://www.mulesoft.org/schema/mule/rest/1.0/mule-rest.xsd |
| Version | 1.0 |
| Minimum Mule Version | 3.2 |
Module Overview
A Mule module for implementing REST APIs whitin flows.
The module includes a custom router that will dispatch the message
to the inner message processors as long as the URI matches and
the processors are attached to the right HTTP method.
Summary
| Message Processors |
|
<rest:router>
A REST router is an intercepting message processor that will only execute if the incoming message
contains a http.request.path property that matches the templareUri parameter.
|
Message Processors
<rest:router>
A REST router is an intercepting message processor that will only execute if the incoming message
contains a http.request.path property that matches the templareUri parameter.
An URI template is a URI-like String that contained variables marked of in
braces (
{,
}), which can be expanded to produce a URI.
The following is an example URI template:
/hotels/{hotel}/bookings/{booking}
If the incoming URI matches the template it will extract the variables in it and it will make them available as
properties.
Attributes
| config-ref |
|
Optional. Specify which configuration to use. |
| templateUri |
|
Template URI string. Variables need to be contained within braces {, }.
|
| method |
|
The HTTP method of the request
|
| uri |
|
The HTTP uri of the request
|
| cont |
|
Callback to be executed if the URI does not match
|
| retryMax |
1 |
Optional. Specify how many times this operation can be retried automatically |
Child Elements
| get |
|
Optional. Processor to be executed when the HTTP method is "GET"
|
| put |
|
Optional. Processor to be executed when the HTTP method is "PUT"
|
| post |
|
Optional. Processor to be executed when the HTTP method is "POST"
|
| delete |
|
Optional. Processor to be executed when the HTTP method is "DELETE"
|
| patch |
|
Optional. Processor to be executed when the HTTP method is "PATCH"
|