Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Response Parsed Body in Paw. How to identify the Key-Path in a long url?

Tags:

paw-app

I have a Paw related question.

Does anybody know how to extract a value from an encoded URL response field with Paw? The value is the only part of the encoded URL which starts with a %3D (the URL encoded version of an = sign).

Getting the dynamic values out of JSON, a JSON array, a URL, etc worked great.

enter image description here

like image 921
rustyMagnet Avatar asked Dec 02 '25 09:12

rustyMagnet


2 Answers

You can use our RegExp Match dynamic value for this: https://luckymarmot.com/paw/extensions/RegExMatch

  • insert the RegExp Match dynamic value first
  • as input for RegExp Match use the Response Parsed Body dynamic value (with the key path to the url-encoded field with the id)
  • write the regular expression to extract the id from the field (see example in the screenshot)

regexp match and response parsed body combined

like image 75
Natalia Panferova Avatar answered Dec 04 '25 15:12

Natalia Panferova


Excellent point Natalia. Instead of the Regex extension I used the Substring extension. This worked perfectly as the size of the encoded URL never changed.

like image 41
rustyMagnet Avatar answered Dec 04 '25 14:12

rustyMagnet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!