mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-09-11 03:55:31 +03:00
curl: use long arguments (#5872)
This commit is contained in:
parent
d02172f9ef
commit
69f02b6510
@ -6,31 +6,31 @@
|
||||
|
||||
- Lade den Inhalt einer URL in eine Datei:
|
||||
|
||||
`curl {{http://beispiel.de}} -o {{pfad/zu/datei}}`
|
||||
`curl {{http://beispiel.de}} --output {{pfad/zu/datei}}`
|
||||
|
||||
- Lade eine Datei von einer URL herunter:
|
||||
|
||||
`curl -O {{http://beispiel.de/datei}}`
|
||||
`curl --remote-name {{http://beispiel.de/datei}}`
|
||||
|
||||
- Lade eine Datei herunter, folge Weiterleitungen und setze vergangene Dateitransfers automatisch fort:
|
||||
|
||||
`curl -O -L -C - {{http://beispiel.de/datei}}`
|
||||
`curl --remote-name --location --continue-at - {{http://beispiel.de/datei}}`
|
||||
|
||||
- Sende formular-codierte Daten (POST Anfragen des Typs `application/x-www-form-urlencoded`). Benutze `-d @dateiname` oder `-d @'-'`, um von STDIN zu lesen:
|
||||
- Sende formular-codierte Daten (POST Anfragen des Typs `application/x-www-form-urlencoded`). Benutze `--data @dateiname` oder `--data @'-'`, um von STDIN zu lesen:
|
||||
|
||||
`curl -d {{'name=karl-dieter'}} {{http://beispiel.de/formular}}`
|
||||
`curl --data {{'name=karl-dieter'}} {{http://beispiel.de/formular}}`
|
||||
|
||||
- Sende eine Anfrage mit einem extra Header mit einer eigenen HTTP-Methode:
|
||||
|
||||
`curl -H {{'X-Mein-Header: 123'}} -X {{PUT}} {{http://beispiel.de}}`
|
||||
`curl --header {{'X-Mein-Header: 123'}} --request {{PUT}} {{http://beispiel.de}}`
|
||||
|
||||
- Sende Daten im JSON-Format und lege den geeigneten Inhaltstyp-Header fest:
|
||||
|
||||
`curl -d {{'{"name":"karl-dieter"}'}} -H {{'Content-Type: application/json'}} {{http://beispiel.de/benutzer/1234}}`
|
||||
`curl --data {{'{"name":"karl-dieter"}'}} --header {{'Content-Type: application/json'}} {{http://beispiel.de/benutzer/1234}}`
|
||||
|
||||
- Übergib einen Benutzernamen und Passwort für die Server-Authentifizierung:
|
||||
|
||||
`curl -u benutzername:passwort {{http://beispiel.de}}`
|
||||
`curl --user benutzername:passwort {{http://beispiel.de}}`
|
||||
|
||||
- Übergib Client-Zertifikat und -Schlüssel für eine Resource und überspringe die Zertifikatsüberprüfung:
|
||||
|
||||
|
@ -6,31 +6,31 @@
|
||||
|
||||
- Unduh konten URL ke file:
|
||||
|
||||
`curl {{http://contoh.com}} -o {{namafile}}`
|
||||
`curl {{http://contoh.com}} --output {{namafile}}`
|
||||
|
||||
- Unduh file, simpan hasilnya dengan nama file yang ditentukan oleh URL:
|
||||
|
||||
`curl -O {{http://contoh.com/namafile}}`
|
||||
`curl --remote-name {{http://contoh.com/namafile}}`
|
||||
|
||||
- Unduh file, mengikuti pengalihan [L] okasi, dan secara otomatis [C] melanjutkan transfer file sebelumnya:
|
||||
- Unduh file, mengikuti pengalihan lokasi, dan secara otomatis melanjutkan transfer file sebelumnya:
|
||||
|
||||
`curl -O -L -C - {{http://contoh.com/filename}}`
|
||||
`curl --remote-name --location --continue-at - {{http://contoh.com/filename}}`
|
||||
|
||||
- Mengirim data form yang telah di encode (permintaan POST atau tipe data `application/x-www-form-urlencoded`). Gunakan `-d @file_name` atau `-d @'-'` untuk membaca dari STDIN:
|
||||
- Mengirim data form yang telah di encode (permintaan POST atau tipe data `application/x-www-form-urlencoded`). Gunakan `--data @file_name` atau `--data @'-'` untuk membaca dari STDIN:
|
||||
|
||||
`curl -d {{'name=bob'}} {{http://contoh.com/form}}`
|
||||
`curl --data {{'name=bob'}} {{http://contoh.com/form}}`
|
||||
|
||||
- Mengirim sebuah permintaan dengan header tambahan, menggunakan metode HTTP kustom:
|
||||
|
||||
`curl -H {{'X-My-Header: 123'}} -X {{PUT}} {{http://contoh.com}}`
|
||||
`curl --header {{'X-My-Header: 123'}} --request {{PUT}} {{http://contoh.com}}`
|
||||
|
||||
- Mengirim data dalam format JSON, Menentukan jenis konten yang sesuai header:
|
||||
|
||||
`curl -d {{'{"name":"bob"}'}} -H {{'Content-Type: application/json'}} {{http://contoh.com/users/1234}}`
|
||||
`curl --data {{'{"name":"bob"}'}} --header {{'Content-Type: application/json'}} {{http://contoh.com/users/1234}}`
|
||||
|
||||
- Memberikan nama pengguna dan kata sandi untuk otentikasi server:
|
||||
|
||||
`curl -u myusername:mypassword {{http://contoh.com}}`
|
||||
`curl --user myusername:mypassword {{http://contoh.com}}`
|
||||
|
||||
- Memberikan sertifikat klien dan kunci untuk sumber daya, melewati validasi sertifikat:
|
||||
|
||||
|
@ -6,31 +6,31 @@
|
||||
|
||||
- Scarica il contenuto di un URL in un file:
|
||||
|
||||
`curl {{http://example.com}} -o {{nome_file}}`
|
||||
`curl {{http://example.com}} --output {{nome_file}}`
|
||||
|
||||
- Scarica un file, salvando l'output con lo stesso nome indicato nell'URL:
|
||||
|
||||
`curl -O {{http://example.com/nome_file}}`
|
||||
`curl --remote-name {{http://example.com/nome_file}}`
|
||||
|
||||
- Scarica un file, seguendo reindirizzamenti, e continuando automaticamente (riprendendo) un trasferimento precedente:
|
||||
|
||||
`curl -O -L -C - {{http://example.com/nome_file}}`
|
||||
`curl --remote-name --location --continue-at - {{http://example.com/nome_file}}`
|
||||
|
||||
- Invia dati form-encoded (richiesta POST di tipo `application/x-www-form-urlencoded`):
|
||||
|
||||
`curl -d {{'nome=mario'}} {{http://example.com/form}}`
|
||||
`curl --data {{'nome=mario'}} {{http://example.com/form}}`
|
||||
|
||||
- Invia una richiesta con un header aggiuntivo, utilizzando un metodo HTTP personalizzato:
|
||||
|
||||
`curl -H {{'X-Mio-Header: 123'}} -X {{PUT}} {{http://example.com}}`
|
||||
`curl --header {{'X-Mio-Header: 123'}} --request {{PUT}} {{http://example.com}}`
|
||||
|
||||
- Invia dati in formato JSON, specificando l'header content-type appropriato:
|
||||
|
||||
`curl -d {{'{"nome":"mario"}'}} -H {{'Content-Type: application/json'}} {{http://example.com/utenti/1234}}`
|
||||
`curl --data {{'{"nome":"mario"}'}} --header {{'Content-Type: application/json'}} {{http://example.com/utenti/1234}}`
|
||||
|
||||
- Utilizza un nome utente ed una password per l'autenticazione con il server:
|
||||
|
||||
`curl -u utente:password {{http://example.com}}`
|
||||
`curl --user utente:password {{http://example.com}}`
|
||||
|
||||
- Utilizza un certificato ed una chiave per una risorsa, ignorando la validazione dei certificati:
|
||||
|
||||
|
@ -6,31 +6,31 @@
|
||||
|
||||
- URL의 내용을 파일로 다운로드:
|
||||
|
||||
`curl {{http://example.com}} -o {{파일명}}`
|
||||
`curl {{http://example.com}} --output {{파일명}}`
|
||||
|
||||
- URL에 표시된 파일 명으로 출력을 저장하고 파일을 다운로드:
|
||||
|
||||
`curl -O {{http://example.com/filename}}`
|
||||
`curl --remote-name {{http://example.com/filename}}`
|
||||
|
||||
- [L]위치 리다이렉션 후 파일을 다운로드 하고, 자동으로 이전 파일 [C]전송(재시작):
|
||||
|
||||
`curl -O -L -C - {{http://example.com/filename}}`
|
||||
`curl --remote-name --location --continue-at - {{http://example.com/filename}}`
|
||||
|
||||
- 양식 인코딩 데이터 전송(`application/x-www-form-urlencoded`유형의 POST 요청):
|
||||
|
||||
`curl -d {{'name=bob'}} {{http://example.com/form}}`
|
||||
`curl --data {{'name=bob'}} {{http://example.com/form}}`
|
||||
|
||||
- 사용자 지정 HTTP 메서드를 사용하여 추가 헤더로 요청 전송:
|
||||
|
||||
`curl -H {{'X-My-Header: 123'}} -X {{PUT}} {{http://example.com}}`
|
||||
`curl --header {{'X-My-Header: 123'}} --request {{PUT}} {{http://example.com}}`
|
||||
|
||||
- 적절한 컨텐츠 유형 헤더를 지정하여 JSON 포멧으로 데이터 전송:
|
||||
|
||||
`curl -d {{'{"name":"bob"}'}} -H {{'Content-Type: application/json'}} {{http://example.com/users/123}}`
|
||||
`curl --data {{'{"name":"bob"}'}} --header {{'Content-Type: application/json'}} {{http://example.com/users/123}}`
|
||||
|
||||
- 서버 인증을 위한 사용자 이름 및 비밀번호 전달:
|
||||
|
||||
`curl -u myusername:mypassword {{http://example.com}}`
|
||||
`curl --user myusername:mypassword {{http://example.com}}`
|
||||
|
||||
- 리소스에 대한 클라이언트 인증서 및 키 전달, 인증서 유효성 검사 스킵:
|
||||
|
||||
|
@ -6,27 +6,27 @@
|
||||
|
||||
- Descarregar os conteúdos de um URL para um arquivo:
|
||||
|
||||
`curl {{http://example.com}} -o {{arquivo}}`
|
||||
`curl {{http://example.com}} --output {{arquivo}}`
|
||||
|
||||
- Descarregar um arquivo, gravando o resultado sob o nome do arquivo indicado pelo URL:
|
||||
|
||||
`curl -O {{http://example.com/arquivo}}`
|
||||
`curl --remote-name {{http://example.com/arquivo}}`
|
||||
|
||||
- Descarregar um arquivo, seguindo redirecionamentos e automaticamente continuando transferências idênticas que tenham sido interrompidas:
|
||||
|
||||
`curl -O -L -C - {{http://example.com/arquivo}}`
|
||||
`curl --remote-name --location --continue-at - {{http://example.com/arquivo}}`
|
||||
|
||||
- Enviar dados codificados por formulário (pedido POST do tipo `application/x-www-form-urlencoded`):
|
||||
|
||||
`curl -d {{'nome=maria'}} {{http://example.com/formulario}}`
|
||||
`curl --data {{'nome=maria'}} {{http://example.com/formulario}}`
|
||||
|
||||
- Enviar um pedido com um cabeçalho adicional, usando um método HTTP personalizado:
|
||||
|
||||
`curl -H {{'X-Meu-Cabecalho: 123'}} -X {{PUT}} {{http://example.com}}`
|
||||
`curl --header {{'X-Meu-Cabecalho: 123'}} --request {{PUT}} {{http://example.com}}`
|
||||
|
||||
- Enviar dados no formato JSON, especificando o cabeçalho de tipo de conteúdo (content-type) apropriado:
|
||||
|
||||
`curl -d {{'{"nome":"maria"}'}} -H {{'Content-Type: application/json'}} {{http://example.com/usuarios/123}}`
|
||||
`curl --data {{'{"nome":"maria"}'}} --header {{'Content-Type: application/json'}} {{http://example.com/usuarios/123}}`
|
||||
|
||||
- Passar ao pedido o nome de usuário e senha para autenticação no servidor:
|
||||
|
||||
|
@ -6,31 +6,31 @@
|
||||
|
||||
- 将指定 URL 的内容下载到文件:
|
||||
|
||||
`curl {{http://example.com}} -o {{文件名}}`
|
||||
`curl {{http://example.com}} --output {{文件名}}`
|
||||
|
||||
- 将文件从 URL 保存到由 URL 指示的文件名中:
|
||||
|
||||
`curl -O {{http://example.com/filename}}`
|
||||
`curl --remote-name {{http://example.com/filename}}`
|
||||
|
||||
- 下载文件,跟随 [L] 重定向,并且自动 [C] 续传(恢复)前序文件传输:
|
||||
- 下载文件,跟随 重定向,并且自动 续传(恢复)前序文件传输:
|
||||
|
||||
`curl -O -L -C - {{http://example.com/filename}}`
|
||||
`curl --remote-name --location --continue-at - {{http://example.com/filename}}`
|
||||
|
||||
- Send form-encoded data (POST request of type `application/x-www-form-urlencoded`):
|
||||
|
||||
`curl -d {{'name=bob'}} {{http://example.com/form}}`
|
||||
`curl --data {{'name=bob'}} {{http://example.com/form}}`
|
||||
|
||||
- 发送带有额外请求头,使用自定义请求方法的请求:
|
||||
|
||||
`curl -H {{'X-My-Header: 123'}} -X {{PUT}} {{http://example.com}}`
|
||||
`curl --header {{'X-My-Header: 123'}} --request {{PUT}} {{http://example.com}}`
|
||||
|
||||
- 发送 JSON 格式的数据,并附加正确的 `Content-Type` 请求头:
|
||||
|
||||
`curl -d {{'{"name":"bob"}'}} -H {{'Content-Type: application/json'}} {{http://example.com/users/1234}}`
|
||||
`curl --data {{'{"name":"bob"}'}} --header {{'Content-Type: application/json'}} {{http://example.com/users/1234}}`
|
||||
|
||||
- 使用用户名和密码,授权访问服务器:
|
||||
|
||||
`curl -u myusername:mypassword {{http://example.com}}`
|
||||
`curl --user myusername:mypassword {{http://example.com}}`
|
||||
|
||||
- 为指定资源使用客户端证书和密钥,并且跳过证书验证:
|
||||
|
||||
|
@ -6,31 +6,31 @@
|
||||
|
||||
- Download the contents of an URL to a file:
|
||||
|
||||
`curl {{http://example.com}} -o {{filename}}`
|
||||
`curl {{http://example.com}} --output {{filename}}`
|
||||
|
||||
- Download a file, saving the output under the filename indicated by the URL:
|
||||
|
||||
`curl -O {{http://example.com/filename}}`
|
||||
`curl --remote-name {{http://example.com/filename}}`
|
||||
|
||||
- Download a file, following [L]ocation redirects, and automatically [C]ontinuing (resuming) a previous file transfer:
|
||||
- Download a file, following location redirects, and automatically continuing (resuming) a previous file transfer:
|
||||
|
||||
`curl -O -L -C - {{http://example.com/filename}}`
|
||||
`curl --remote-name --location --continue-at - {{http://example.com/filename}}`
|
||||
|
||||
- Send form-encoded data (POST request of type `application/x-www-form-urlencoded`). Use `-d @file_name` or `-d @'-'` to read from STDIN:
|
||||
- Send form-encoded data (POST request of type `application/x-www-form-urlencoded`). Use `--data @file_name` or `--data @'-'` to read from STDIN:
|
||||
|
||||
`curl -d {{'name=bob'}} {{http://example.com/form}}`
|
||||
`curl --data {{'name=bob'}} {{http://example.com/form}}`
|
||||
|
||||
- Send a request with an extra header, using a custom HTTP method:
|
||||
|
||||
`curl -H {{'X-My-Header: 123'}} -X {{PUT}} {{http://example.com}}`
|
||||
`curl --header {{'X-My-Header: 123'}} --request {{PUT}} {{http://example.com}}`
|
||||
|
||||
- Send data in JSON format, specifying the appropriate content-type header:
|
||||
|
||||
`curl -d {{'{"name":"bob"}'}} -H {{'Content-Type: application/json'}} {{http://example.com/users/1234}}`
|
||||
`curl --data {{'{"name":"bob"}'}} --header {{'Content-Type: application/json'}} {{http://example.com/users/1234}}`
|
||||
|
||||
- Pass a user name and password for server authentication:
|
||||
|
||||
`curl -u myusername:mypassword {{http://example.com}}`
|
||||
`curl --user myusername:mypassword {{http://example.com}}`
|
||||
|
||||
- Pass client certificate and key for a resource, skipping certificate validation:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user