3

The documentation for Response Parsed Body Dynamic Value doesn't make much sense to me. I r-clicked on the JSON response element as described, in this case, userid

{"authorization":"T98J_J8QcH5lC83TOKZxaWB","userid":"T98J_J8QcH5lC83TOKZxaWB","lastLogin":"2014-12-15 15:17"}

but did not receive the menu option to Copy as Dynamic Value as stated. I got the standard text editor context menu. So, either I'm misreading the doc, or it's incorrect. Here's what I want to do: Take the dynamic value for the userid and pass it as part of the URL (not a parameter) to subsequent calls. Is this possible with Paw?

Micha Mazaheri
  • 3,481
  • 1
  • 21
  • 26
Mike S.
  • 2,048
  • 1
  • 32
  • 55

1 Answers1

2

Here's how you can do it manually.

  1. Right click on the field where you want to reuse the value. In the contextual menu, pick Response > Response Parsed Body Paw Response Parsed Body Dynamic Value (1)

  2. Pick the request you want to extract the response from. Enter the JSON key path. Make it explicitly JSON format (Automatic uses the Content-Type, which may not match in some cases). Paw Response Parsed Body Dynamic Value (2)

The Copy as Dynamic Value may not work if your response is not interpreted as JSON, maybe the server is not setting a Content-Type: application/json header?

Micha Mazaheri
  • 3,481
  • 1
  • 21
  • 26
  • As I stated originally, the dynamic value is part of the URL not a parameter. So, I want `http://stuff.com/user/dynamicStuffHere/` not `http://stuff.com?user=dynamicStuffHere`. Your example demonstrates the latter. – Mike S. Dec 17 '14 at 15:56
  • Updated my answer to match that. It doesn't matter where you insert that dynamic value, can be in URL as host, path, or in URL params, or headers, or request body. This works anywhere... – Micha Mazaheri Dec 18 '14 at 07:25
  • Thanks for the update. BTW, updated to 2.1.1. Like the interface enhancements. Sent support email to retrieve my license key. – Mike S. Dec 19 '14 at 14:01