I am trying to perform an HTTP(s) request in a Jmeter test plan using the OS Process Sampler, but I am getting an error on one of the curl parameters. I am running Jmeter on a Windows machine.
Here is the original curl command, which works if I run it from the command line:
curl -k -L -b .\cookies -c .\cookies -E h:\curl\EXP\curl\bin\publicCert.pem.crt --key H:\curl\EXP\curl\bin\privateKey.pem.key https://myhost.foo.com//xxx.cgi?encreply=xxxxxxxxx
The error that I am seeing in Jmeter is:
curl: option --key H:\curl\EXP\curl\bin\privateKey.pem.key: is unknown
curl: try 'curl --help' or 'curl --manual' for more information
I think (but am not sure) that the problem is that Jmeter seems to not like the "--key" parameter, maybe because of the 2 dashes ("--").
The reason I am guessing that is that earlier, I had problem with the parameter for the certificate, which was "--cert" and I was able to eliminate that earlier problem by changing to the "-E" parameter, which has a single dash.
Unfortunately, there doesn't seem to be a single-dash parameter for the key file.
Can someone tell me why I am getting that error when I try to run the curl under Jmeter, but it is ok when I run the curl from the command line?
Thanks!
P.S. FYI, the reason I am trying to send the request via the OS Process Sampler instead of the HTTP request is that the URI has some characters that are causing the HTTP Request step to throw a URI exception. I cannot encode that URI because it has some kind of hash and if I encode the URL, that causes the has to be bad on the server-side, so I am trying to see if I can substitute using the OS Process Sampler.