paw-app

How To Use A Variable As A URL Parameter With PAW API Tool For Mac?


This question relates to the PAW API tool available for Mac, version 3.1.5.

I know that I can use variables in the request URL to change things such as protocol, host, etc. Also that they may be used within the text body to change JSON and so on.

Is there a way to also use them in URL parameters? E.g.

http://www.foo.com?bar=yes

where bar is a variable that is configured in the Environments view? enter image description here


Solution

  • You can absolutely do so.

    1. Configure your variable in the Environment Variables editor
    2. In the URL Params tab, add a new parameter: choose a name
    3. In the value field, right-click and pick Environment > [Your variable]

    Alternatively, instead of using the contextual menu, you can use autocompletion to find your variable.

    Here's how it should look like:

    Configure a variable as a URL query parameter in Paw