HTTP Router and Multiple URI Parameters

asked 2019-05-31 19:06:07 -0500

WebMenace gravatar image

updated 2019-06-01 01:58:22 -0500

I couldn't find an example anywhere... and the HTTP router documentation is fairly thin. This may be a POST vs GET question??

I was really trying to find out if I could use a GET on doing something like:

HTTP ROUTER ENTRY:

GET   /rest/v1/order/total/range/from/${range_from}/thru/${range_thru}

And then use the Expression Evaluator to pick up the fields like so:

Expression Evaluator: [ Expressesions | Field Expressions ]

/range_from    ${str:regExCapture(record:attribute('path'),      '^/rest/v1/order/total/range/from/(.*)/thru/(.*)', 1)}

/range_thru    ${str:regExCapture(record:attribute('path'),      '^/rest/v1/order/total/range/from/(.*)/thru/(.*)', 2)}

Is using a GET this way not supported and I should use a POST instead?

edit retag flag offensive close merge delete