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
The documentation doesn't give any indication of what the expected format for the variables is. I tried reviewing the code and (not being a Typescript developer) it wasn't overly obvious except that it seemed like an array of strings which contained name=value pairs (separated by the equals).
I ask because I'm having trouble getting the commandline --var option pass variables.
I am running this on Windows x64 using Powershell.
My last attempt looked like:
httpyac somefilename-v1.http -e dev --all --var SUBSCRIPTION_KEY=123456 --verbose
And I'm getting (which actually looks like it might be picking up the variable now - aside note the misspelling of environment in the verbose log):
GET /api-{{ENVIRONMENT}}/v1
Authorization: openid client_credentials local
Subscription-Key: {{SUBSCIPTION_KEY}}
Correlation-ID: {{$guid}}
[-] SUBSCIPTION_KEY is not defined (ReferenceError: SUBSCIPTION_KEY is not defined - Object.userJS (somefilename.http:12:20)
ReferenceError: SUBSCIPTION_KEY is not defined
I'm also wondering whether client credentials (particularly the secret) can be passed in from the command line. Having to write out a file with a plain text password doesn't seem to conform to general security principles. Presumably if I can get Subscription Key passed in then TOKEN_CLIENT_SECRET should also be able to be passed on?
Thanks
The text was updated successfully, but these errors were encountered:
The documentation doesn't give any indication of what the expected format for the variables is. I tried reviewing the code and (not being a Typescript developer) it wasn't overly obvious except that it seemed like an array of strings which contained name=value pairs (separated by the equals).
I ask because I'm having trouble getting the commandline --var option pass variables.
I am running this on Windows x64 using Powershell.
My last attempt looked like:
httpyac somefilename-v1.http -e dev --all --var SUBSCRIPTION_KEY=123456 --verbose
And I'm getting (which actually looks like it might be picking up the variable now - aside note the misspelling of environment in the verbose log):
current environement variables {
SUBSCRIPTION_KEY: '123456',
host: 'https://host.domain.com.au',
ENVIRONMENT: 'dev',
'$global': {},
'$getOAuth2Response': [AsyncFunction: pt]
}
GET /api-{{ENVIRONMENT}}/v1
Authorization: openid client_credentials local
Subscription-Key: {{SUBSCIPTION_KEY}}
Correlation-ID: {{$guid}}
[-] SUBSCIPTION_KEY is not defined (ReferenceError: SUBSCIPTION_KEY is not defined - Object.userJS (somefilename.http:12:20)
ReferenceError: SUBSCIPTION_KEY is not defined
I'm also wondering whether client credentials (particularly the secret) can be passed in from the command line. Having to write out a file with a plain text password doesn't seem to conform to general security principles. Presumably if I can get Subscription Key passed in then TOKEN_CLIENT_SECRET should also be able to be passed on?
Thanks
The text was updated successfully, but these errors were encountered: