azagniotov/stubby4j — pull request #34 by pizzqc (2014-02-25 20:49:57+00:00)
Title: Adding "callback" capabilities to a response

Added the capability to send asynchronous request in addition to the initial response. Here is a YAML representation.

- request:
method: [POST, PUT]
url: /rest/callmeback.*
headers:
x-reference: "(.*)"
x-return-url: "(.*)"

response:
- status: 202
headers:
content-type: text/plain
callback:
method: POST
url: <% headers.x-return-url.0 %>
latency: 10
headers:
content-type: application/json
body: >
{
"id":"20140222144501-308",
"reference":"<% headers.x-reference.0 %>"
}

- status: 429
headers:
content-type: text/plain

I tried re-using as much as possible .. hope you like it :D this is my first pull request ever !!

Thanks for the nice stubby btw :)

/Antoine