Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The issue is probably related to quotations among other shell related things. Observe:

    NAME=taterman
    EMAIL=sweettaterhater@taterman.com
    curl --jp "user=$NAME" --jp "email=$EMAIL" http://getdemtaters.com
vs

    curl -d "{\"user:\"$NAME\",\"email\":\"$EMAIL\"}" http://getdemtaters.com
Even adding jq to requirements doesn't make it that much better:

    jq -n --arg name "$NAME" --arg email "$EMAIL" '{ "user": $name, "email": $email }' | curl -d @-


it might be easier if you use heredoc




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: