Problem
When using variables inside HTTP endpoint attributes, the behavior is inconsistent depending on whether the variable value contains a leading slash (/).
Current behavior
This works:
<var name="resourceEndpoint">
<constant value="api/test/auth/jwt/resource"/>
</var>
<http alias="MEGA_APP">
<get endpoint="/{{resourceEndpoint}}">
<response code="200"/>
</get>
</http>
But this more natural form does not work as expected:
<var name="resourceEndpoint">
<constant value="/api/test/auth/jwt/resource"/>
</var>
<http alias="MEGA_APP">
<get endpoint="{{resourceEndpoint}}">
<response code="200"/>
</get>
</http>
Expected: both "/{{var}}" and "{{var}}" should work the same way regardless of whether the variable value starts with "/".
Suggestion: normalize endpoint handling during variable substitution.
Problem
When using variables inside HTTP
endpointattributes, the behavior is inconsistent depending on whether the variable value contains a leading slash (/).Current behavior
This works:
But this more natural form does not work as expected:
Expected: both "/{{var}}" and "{{var}}" should work the same way regardless of whether the variable value starts with "/".
Suggestion: normalize endpoint handling during variable substitution.