POST XML file using cURL command line

If that question is connected to your other Hudson questions use the command they provide. This way with XML from the command line: $ curl -X POST -d ‘<run>…</run>’ \ http://user:pass@myhost:myport/path/of/url You need to change it a little bit to read from a file: $ curl -X POST -d @myfilename http://user:pass@myhost:myport/path/of/url Read the manpage. following … Read more

How can you debug a CORS request with cURL?

Here’s how you can debug CORS requests using curl. Sending a regular CORS request using cUrl: curl -H “Origin: http://example.com” –verbose \ https://www.googleapis.com/discovery/v1/apis?fields= The -H “Origin: http://example.com” flag is the third party domain making the request. Substitute in whatever your domain is. The –verbose flag prints out the entire response so you can see the … Read more

Call to undefined function curl_init().? [duplicate]

If you’re on Windows: Go to your php.ini file and remove the ; mark from the beginning of the following line: ;extension=php_curl.dll After you have saved the file you must restart your HTTP server software (e.g. Apache) before this can take effect. For Ubuntu 13.0 and above, simply use the debundled package. In a terminal … Read more

curl: (60) SSL certificate problem: unable to get local issuer certificate

Relating to ‘SSL certificate problem: unable to get local issuer certificate’ error. It is important to note that this applies to the system sending the CURL request, and NOT the server receiving the request. Download the latest cacert.pem from https://curl.se/ca/cacert.pem Add the ‘–cacert /path/to/cacert.pem’ option to the curl command to tell curl where the local … Read more

How to urlencode data for curl command?

Use curl –data-urlencode; from man curl: This posts data, similar to the other –data options with the exception that this performs URL-encoding. To be CGI-compliant, the <data> part should begin with a name followed by a separator and a content specification. Example usage: curl \ –data-urlencode “paramName=value” \ –data-urlencode “secondParam=value” \ http://example.com See the man … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)