-
Notifications
You must be signed in to change notification settings - Fork 373
Description
I created request at postman, tested it, all works fine, then I clicked on Code button at the right top corner, copied CURL code, and tried to use it in Windows Shell and got the errors
`At line:2 char:3
- --header 'x-pr-tenantid: 2720F16E-1E5B-4AA5-93CB-6169E36B5C9E' \
- ~
Missing expression after unary operator '--'.
At line:2 char:3 - --header 'x-pr-tenantid: 2720F16E-1E5B-4AA5-93CB-6169E36B5C9E' \
-
Unexpected token 'header' in expression or statement.
At line:3 char:3
- --header 'x-pr-apikey: <<>> ...
- ~
Missing expression after unary operator '--'.
At line:3 char:3 - --header 'x-pr-apikey: <<>> ...
-
Unexpected token 'header' in expression or statement.
At line:4 char:3
- --header 'Authorization: Bearer <> ...
- ~
Missing expression after unary operator '--'.
At line:4 char:3 - --header 'Authorization: Bearer <> ...
-
Unexpected token 'header' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingExpressionAfterOperator`
Then I changed --header on -h and got the new ones
`Invoke-WebRequest : A positional parameter cannot be found that accepts argument '--request'.
At line:1 char:1
- curl --location --request GET 'http://localhost:60513//sip/transactio ...
-
+ CategoryInfo : InvalidArgument: (:) [Invoke-WebRequest], ParameterBindingException + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
-h : The term '-h' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:2 char:1
- -h 'x-pr-tenantid: 2720F16E-1E5B-4AA5-93CB-6169E36B5C9E' \
- ~~
- CategoryInfo : ObjectNotFound: (-h:String) [], CommandNotFoundException
- FullyQualifiedErrorId : CommandNotFoundException
-h : The term '-h' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:3 char:1
- -h 'x-pr-apikey: <<>> ...
- ~~
- CategoryInfo : ObjectNotFound: (-h:String) [], CommandNotFoundException
- FullyQualifiedErrorId : CommandNotFoundException
-h : The term '-h' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:4 char:1
- -h 'Authorization: Bearer <> ...
- ~~
- CategoryInfo : ObjectNotFound: (-h:String) [], CommandNotFoundException
- FullyQualifiedErrorId : CommandNotFoundException`