The request string in the example below interpolates version variable, but keeps the curly braces and I can't figure out why.
#!/bin/sh
version=2989
request="http://example.com/?version={$version}&therest"
echo "$request"
Result:
$ ~/script.sh
http://example.com/?version={2989}&therest
Environment:
$ echo $0
-zsh
$version
is replaced, because variable expansion is one the things which does get performed within double-quoted strings.