I am using the curl command in PowerShell to post the comment on the Bitbucket pull request page through a Jenkins job. I used the below PowerShell command to execute the curl command, but I am getting the error mentioned below. How can I get it to work?
$CurlArgument="-u [email protected]:yyyy -X POST https://xxx.bitbucket.org/1.0/repositories/abcd/efg/pull-requests/2229/comments --data content=success"
$CURLEXE='C:\Program Files\Git\mingw64\bin\curl.exe'
& $CURLEXE $CurlArgument
Error details:
curl.exe : curl: no URL specified!
At line:3 char:1
+ & $CURLEXE $CurlArgument
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (curl: no URL specified!:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
curl: try 'curl --help' or 'curl --manual' for more information
Invoke-WebRequestcdmlet?