cURL : 다양한 프로토콜을 지원하는 데이터 전송용 Command Line Tool. (HTTP, HTTPS, FTP, SFTP, SMTP등을 지원한다)
version 확인
curl --verison
curl -v
기본적인 옵션들
-d, --data: <data> Send specified data in POST request.
-H, --header: <header> Headers to supply with request.
-X, --request: The request method to use. ex) GET, POST
+)
-k : insecure mode로 사용가능. cURL의 verification of the certificate을 끄기 위해서 사용
curl: (60) SSL certificate problem: 을 임시로 해결하기 위해서 사용했다.
에러로그는 다음과 같다
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
예제
curl -d "key1=value1&key2=value2" -H "(header_field): (header_value)" -X GET (http://URL)