A template tag, that can be used inside URIs as path parameters.
Add the plugin to Insomnia by its name: "insomnia-plugin-path-parameter-tag".
Create/edit a request, and when you want a path parameter:
{% pathParam %}
, which does the same.Here's an example of a URI with the value of https://example.com/{% pathParam %}
.
Click on the tag to edit its Value and optionally Display name.
Only "Value" is required - this will be sent with the request.
Here's the URI and CURL previews with the request above, and a value set:
"Description" is not sent anywhere, and is there only for documentation purpose.
"Display name" is also not sent anywhere, but you can use it to configure the look of the tag in Insomnia UI.
:param
style parametersNo automated way, but there's a workaround to quickly replace all of :param
style parameters to use this tag instead - throughout all workspaces:
{insomnia-config-directory}/insomnia.Request.db
(see Insomnia docs on where the directory is).(?<=/)(:\w+)
to {% pathParam '$1', '', '', true %}
(this replaces anything that looks like /:param
to become /{% pathParam ':param', '', '', true %}
.Limiting this transformation to only one project would probably involve exporting the project, and doing the same on the export data only, then reimporting.