Hacker News new | ask | show | jobs
by throwaddzuzxd 1603 days ago
I've included --json in a custom redefinition for years, glad to see something like that coming to the official binary!

    curl() {
      args=()
      for arg in "$@"; do
        case $arg in
        --json) args+=("-H" "Content-Type: application/json") ;;
        *) args+=("$arg") ;;
        esac
      done
      command curl "${args[@]}"
    }