Small web server that receives http requests and redirect them to any (reactive) subscriber
and few other useful for tests use cases
The original purpose is - writing integration tests.
Supported GET and POST
Tests subscribe to possible 4 end-points (supporting only: application/x-json-stream for streaming or single requests with application/json) :
- /subscribe/http/all - redirects to subscriber any request received by server
- /subscribe/http/uri/{uri} - filters requests by URI
- /subscribe/http/method/{method} - filters requests by http method
- /subscribe/http/filter/{method}/{uri} - filters requests by uri and http method
Service (or some pipeline that ends with sending HttpRequest) we want to test should send/redirect requests to:
- /receive/get/{any uri}
- /receive/post/{any uri}
- /receive/put/{any uri}
There are 2 options:
- global
- per endpoint
We defined 2 parameters: status (i.e. different from 200) and change frequency counter (a.k.k.a how often we return status)
Default values are: for status = 404 and freqCounter = 10 - means every 10th request server returns status 404
Initial values defined in application.yml file (but it could be changed on the fly - see later)
Supported GET and POST
End Point to send requests to: /status/global/{any uri suffix}
End Point to change default global: /global/change/status/{status}/freq/{freq} - change of this values will affect anyone who uses end point above
Same logic, but you can define status and change frequency inside end point url
/status/{status}/freq/{freq}/{/get:.}* - self explained (if not open me bug :) )