luckymarmot / Paw-Issues

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

Self-dependency error on dynamic value in body with urlEncodedBody #51

Closed nsiniakevich closed 8 years ago

nsiniakevich commented 8 years ago

Hi, this's just a reminder about that issue. http://stackoverflow.com/questions/32922511/calculating-dynamic-value-from-request-body-parameters-in-paw

As I understand the current solution is to duplicate parameters in headers.

Is there better solution?

mittsh commented 8 years ago

This has been fixed in newer versions of Paw. Sorry for not updating my StackOverflow answer earlier:

It has been fixed in newer versions of Paw. You can simply do like suggested in the question. Right-click and pick Request > Request Parsed Body.

Set a reference to another part of the request body in Paw

Add all the references you need, and you'll have the wanted hash:

Referencing a hash in a request in Paw

You now have the MD5 of the three first params concatenated (no error reported).

nsiniakevich commented 8 years ago

@mittsh I have more complex logic and I have to use extension.

But I've already figure out how to handle it in the code: replace request.urlEncodedBody to request.getUrlEncodedBody(true) and work with parameters as DynamicString.

Thank you.

mittsh commented 8 years ago

Yep, that's a good way to go 😄