Reuse variable in curl call