You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a web service I'm trying to connect to that provides its response based on the extension passed in via the URL (e.g. .xml or .json), rather than the Accept HTTP header.
When passing path parameters in the URL, the path looks like /get_item/:item_id.xml, but Insomnia treats item_id.xml as the name of the parameter.
Ideally this would just work, with the . functioning like a / in ending the path parameter token name, but failing that it would be nice if there was some optional way to forcibly indicate the end of a parameter name (e.g. /get_item/:{item_id}.xml or similar), to allow these kinds of URLs to be modelled with path parameters.
In the meantime my workaround has been to use an unchecked query parameter, then set the URL in Insomnia to /get_item/{% request 'parameter', 'item_id', 0 %}.xml, but unchecked parameters feel much less appropriate than path parameters for this purpose.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a web service I'm trying to connect to that provides its response based on the extension passed in via the URL (e.g.
.xml
or.json
), rather than theAccept
HTTP header.When passing path parameters in the URL, the path looks like
/get_item/:item_id.xml
, but Insomnia treatsitem_id.xml
as the name of the parameter.Ideally this would just work, with the
.
functioning like a/
in ending the path parameter token name, but failing that it would be nice if there was some optional way to forcibly indicate the end of a parameter name (e.g./get_item/:{item_id}.xml
or similar), to allow these kinds of URLs to be modelled with path parameters.In the meantime my workaround has been to use an unchecked query parameter, then set the URL in Insomnia to
/get_item/{% request 'parameter', 'item_id', 0 %}.xml
, but unchecked parameters feel much less appropriate than path parameters for this purpose.Beta Was this translation helpful? Give feedback.
All reactions