What is the correct way to embed an email string in a curl POST command? Doesn't the @ get confused?

curl -d "name=Ivan&email=idf@xxx.com&password=secret" -H "Content-Type: application/x-www-form-url-encoded" -X POST http://localhost:5000/api/auth/register
  • looks like it doesn't. – Ivan Jan 23 '18 at 0:42

The @ is only special if it is the first character specified as an argument to -d. Use --data-raw if you want to avoid any ambiguity about the @ character.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.