Closed kerrishotts closed 8 years ago
Sorry for the late answer @kerrishotts. I believe this is now possible in Paw 2.1 with the Regex Extension: http://luckymarmot.com/paw/extensions/RegexDynamicValue
Something like this would be possible (for substr(2,5)
):
Otherwise, it would be nice to add a "Substring Dynamic Value". We will release soon a tutorial on how to write Extensions.
I keep that open until we have a proper "Substring Dynamic Value".
Awesome; I shall have to give this a try. Thanks for your response!
No problem at all.
Does https://github.com/luckymarmot/Paw-SubstringDynamicValue fulfill this?
Yes, the Substring DV + Regexp DV will solve these requirements. Thanks for pointing this out @drewish! Closing.
I've been using PAW to test my API, and it's absolutely fantastic. I've been trying to make it behave closer to how my app would, so rather than hard-code the API paths (say,
/people/2
), the API returns a template href like/person/{personId}
in the response. I would then love to be able to use this as part of the URL for the next request. (I can, but only if the response doesn't include the template portion. For now, I can work around this with an additional href in the response, but it'd be nice to avoid having to do so).It would be nice to have either:
substr(0,7)
would get me the path I want){...}
values akin to the query parameter editing you have nowI'd wager the first is easiest, but the second would be really quite nice.