-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Curl code from postman doesn't work #186
Comments
@forenheith Let me look into this! |
@forenheith Also, we'll need more details about this. Can you please provide us with the following information: Postman App version: Finally, can you share the exact Postman Request and the cURL code generated here? (Remove all sensitive information). |
I guess when you say 'Windows Shell' you mean PowerShell. Guys, it would be great to have backtick (`) as an option for Line continuation character in addition to \ and ^. |
I hope i can comment my similar situation within this issue. I ended up with such request, for example: |
I can't change the delimiter using the Postman. Also for using PowerShell I should change curl to curl.exe and run this script from the Curl's directory. |
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
Missing expression after unary operator '--'.
At line:2 char:3
Unexpected token 'header' in expression or statement.
At line:3 char:3
Missing expression after unary operator '--'.
At line:3 char:3
Unexpected token 'header' in expression or statement.
At line:4 char:3
Missing expression after unary operator '--'.
At line:4 char:3
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
-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 : 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 : 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
The text was updated successfully, but these errors were encountered: