curl

Linux · Network · available in the simulator

What it does

Transfer data from or to a server using multiple protocols.

Syntax

curl [opciones] URL

Options and parameters

  • -o

    Write output to the specified file.

    curl -o pagina.html https://example.com
  • -O

    Write output to a local file named like the remote file.

  • -L

    Follow redirects.

  • -I

    Fetch the HTTP headers only.

    curl -I https://example.com
  • -X

    Specify request method to use.

    curl -X POST https://api.example.com
  • -H

    Pass custom header(s) to server.

    curl -H "Accept: application/json" https://api.example.com
  • -d

    Send data in the request body.

  • -u

    Specify user and password for server authentication.

  • -s

    Silent mode (do not show progress meter or error messages).

  • -k

    Allow insecure server connections when using SSL/TLS.

Usage examples

  • curl https://example.com
  • curl -L -o archivo.zip URL
  • curl -o pagina.html https://example.com
  • curl -I https://example.com
  • curl -X POST https://api.example.com
  • curl -H "Accept: application/json" https://api.example.com
Practise curl

Related commands