luckymarmot / Paw-Issues

The issue tracker repository for the Paw HTTP Client app.
33 stars 0 forks source link

Enhanced Parsed Request Body (JSON) #14

Closed kerrishotts closed 8 years ago

kerrishotts commented 10 years ago

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:

I'd wager the first is easiest, but the second would be really quite nice.

mittsh commented 9 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)):

image

Otherwise, it would be nice to add a "Substring Dynamic Value". We will release soon a tutorial on how to write Extensions.

mittsh commented 9 years ago

I keep that open until we have a proper "Substring Dynamic Value".

kerrishotts commented 9 years ago

Awesome; I shall have to give this a try. Thanks for your response!

mittsh commented 9 years ago

No problem at all.

drewish commented 8 years ago

Does https://github.com/luckymarmot/Paw-SubstringDynamicValue fulfill this?

mittsh commented 8 years ago

Yes, the Substring DV + Regexp DV will solve these requirements. Thanks for pointing this out @drewish! Closing.