Skip to content

Instantly share code, notes, and snippets.

@jvmvik
Last active May 3, 2020 01:29
Show Gist options
  • Select an option

  • Save jvmvik/7ef5fc95d259bf7746131f69a15b73c7 to your computer and use it in GitHub Desktop.

Select an option

Save jvmvik/7ef5fc95d259bf7746131f69a15b73c7 to your computer and use it in GitHub Desktop.
Curl

Pratical CURL commands

return not 0 exit code if http status != 200

curl --silent --show-error --fail URL

  • --silent hides the progress and error
  • --show-error shows the error message hidden by --silent
  • --fail returns an exit code > 0 when the request fails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment