ga-wdi-boston / jquery-ajax-diagnostic

Other
0 stars 144 forks source link

Typo in solution #111

Open BenGitsCode opened 8 years ago

BenGitsCode commented 8 years ago

In "Create a Single Resource"

error in the curl request the $ after data does not belong

curl --include --request "POST" "http://example.com/donuts" \
  --header "Content-Type: application/json" \
  --data $'{
    "donut": {
      "name": "French Cruller",
      "price": "$0.99"
    }
  }'
raq929 commented 8 years ago

Nice catch; I didn't even see that.

gaand commented 8 years ago

It actually works fine in bash. It's for inserting ansi-c escapes in strings, see: https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html#ANSI_002dC-Quoting

It's not what's intended here, so should be removed.