Very new to the world of Mountebank (it's awesome though :) )and attempting to get my head around the copy function/behavior
I had hoped to use regex selectors to pull values from the request and assign them to variables that were accessible when using the inject functionality
"responses": [{
"inject": "<%- stringify(filename, '999.ejs') %>",
"_behaviors": {
"copy": [
{
"from": "body",
"into": "${state.ediVersion}",
"using": { "method": "regex", "selector": "ST" }
},
{
"from": "path",
"into": "${state.Path}",
"using": { "method": "regex", "selector": ".*" }
}
]}
}]
Should hopefully give some context to the type of thing I wanted to do. I thought I might be able to use the state object that is accessible when injecting behavior but it's not quite working. I assume the state isn't really 'reserved' or I'm referencing it wrong externally.
Any ideas?
I think I can just pull the parsing down into the inject function which i'm looking to do now but had wondered if the 2 were compatible with each other
--
You received this message because you are subscribed to the Google Groups "mountebank-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mountebank-discuss+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.