Why curl is not working but wget is working fine. May be duplicate question but need to be fixed please

Viewed 208

My Curl command

curl -m 30  --retry 5 -O um.txt -X POST '{"request": {"validityDays": 200, "serviceProviderCodeToken": "28dd0b82-4244-4c46-9c62-33b192c13da3", "certificateSigningRequest": "-----BEGIN CERTIFICATE REQUEST-----\nMIIBBDCBrAIBADBKMQswCQYDVQQGEwJJTjESMBAGA1UECAwJVEVMQU5HQU5BMQ0w\nCwYDVQQHDARhc2RmMQwwCgYDVQQKDANSU04xCjAIBgNVBAMMATQwWTATBgcqhkjO\nPQIBBggqhkjOPQMBBwNCAAR/dc7YRhROHSrPjyFpd4XOOxJVWOFUvuP1O0KUxJp3\nhouCsNGrUDHN2GTqyaTl+uTodoeHU7Sm9KhLRcHKd4EVoAAwCgYIKoZIzj0EAwID\nRwAwRAIgW2L33eUDGSWWZGMWMfUWUfyoFBWTFOSvcvFSvlPyRzMCIF3zN2THnroN\n4LDbVFQPn3w+KnYsq7d/0ML+CzCjDP74\n-----END CERTIFICATE REQUEST-----\n"}}' --header Content-Type:'application/json' --header Authorization:'Red' https://ca.red.com/api/csr

I am getting an Error when i use curl as following

curl: try 'curl --help' or 'curl --manual' for more information
curl: (3) [globbing] nested brace in column 13
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator at
 jim@redshiftnetworks.com to inform them of the time this error occurred,
 and the actions you performed just before this error.</p>
<p>More information about this error may be available
in the server error log.</p>
</body></html>
Warning: Transient problem: HTTP error Will retry in 1 seconds. 5 retries
Warning: left.

My wget getting expected value

wget --no-check-certificate --timeout=30  --tries=5 -O ks.txt --post-data '{"request": {"validityDays": 200, "serviceProviderCodeToken": "28dd0b82-4244-4c46-9c62-33b192c13da3", "certificateSigningRequest": "-----BEGIN CERTIFICATE REQUEST-----\nMIIBCjCBsQIBADBPMQswCQYDVQQGEwJJTjESMBAGA1UECAwJVEVMQU5HQU5BMREw\nDwYDVQQHDAhzYXlhbXBldDENMAsGA1UECgwEYW5kIDEKMAgGA1UEAwwBNDBZMBMG\nByqGSM49AgEGCCqGSM49AwEHA0IABENcdJYtZ/3PBvtvyTJZG9C8ddSaTbcXjrQo\ntsobys9AiRajZVPmUv6sGrhoatzdFNoJKl59v3V5kC3wKMHqLnSgADAKBggqhkjO\nPQQDAgNIADBFAiB5+qqpusIeLhtNNYcqQireUuhQRfBpy2X7qOAp6eF5qgIhAJUU\nbxhP5N7pBwidaUNTx2sfhEgTDaHduzkVCMTGD0Ot\n-----END CERTIFICATE REQUEST-----\n"}}' --header=Content-Type:'application/json' --header=Authorization:'Redshift1' https://ca.redshiftnetworks.com/api/csr

I am able to expected once with wget

0 Answers
Related