def requestArray = ['curl', '-X', 'POST', "\"https://api.poeditor.com/v2/projects/export\"",
'-d', 'api_token=\"API\"',
'-d', 'id=\"' + projectId + '\"',
'-d', 'language=\"' + lang + '\"',
'-d', 'type=\"android_strings\"']
println(requestArray)
def request = requestArray.execute()
request.waitFor()
def response = request.text
Works well on local machine.
Also curl from SSH session on CircleCI works:
circleci@1ddd13d4aa60:~$ curl -X POST https://api.poeditor.com/v2/projects/export \
> -d api_token="22d988cb4a939df8d62553195730fdf4" \
> -d id="250751" \
> -d language="fr-ch" \
> -d type="android_strings"
{"response":{"status":"success","code":"200","message":"OK"},"result":{"url":"https:\/\/api.poeditor.com\/v2\/download\/file\/b4c337577e2d06219f06b7cc008bdf30"}}
But when I run the command (that works on local machine)
circleci@1ddd13d4aa60:~/code$ ./gradlew app:downloadTranslations
it just return an empty string instead of Json and even no error.