cURL

command line tool and library
for transferring data with URLs

지원 프로토콜

DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, Telnet and TFTP. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, HTTP/2, HTTP/3, cookies, user+password authentication (Basic, Plain, Digest, CRAM-MD5, NTLM, Negotiate and Kerberos), file transfer resume, proxy tunneling and more.

기본사용

curl ipconfig.me

자주 사용하는 옵션

shortlong설명
-v–verbose내용을 자세하게 출력한다
-X–requestrequest method 지정
-H–headerrequest header 지정
-d–data사용자가 HTML 양식을 채우고 제출하는 방식과 동일한 POST 요청의 지정된 데이터를 HTTP 서버로 보냄
-o–output지정된 이름으로 파일저장

예제보기

#URL
POST /v1/synthesize HTTP/1.1
Host: kakaoi-newtone-openapi.kakao.com
Content-Type: application/xml
Authorization: KakaoAK {rest_api_key}
#REQUEST
curl -v -X POST "https://kakaoi-newtone-openapi.kakao.com/v1/synthesize" \
-H "Content-Type: application/xml" \
-H "Authorization: KakaoAK kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk" \
-d '<speak>
그는 그렇게 말했습니다.
<voice name="MAN_DIALOG_BRIGHT">잘 지냈어? 나도 잘 지냈어.</voice>
<voice name="WOMAN_DIALOG_BRIGH" speechStyle="SS_ALT_FAST_1">금요일이 좋아요.</voice>
</speak>' > result.mp3

참조

같이보기