Conversation
📝 HackYourFuture auto gradeAssignment Score: 76 / 100 ✅Status: ✅ Passed Test Details |
| curl -X POST http://localhost:3000/users \ | ||
| -H "application/json; charset=UTF-8" \ | ||
| -d | ||
| '{ |
There was a problem hiding this comment.
Look near this point to fix your code, please review my feedback
JQnetherlands
left a comment
There was a problem hiding this comment.
Hello,
Let’s start with the good news, You implemented the task 2 in a very organised way and following the documentation of URLSearchParams, I like a lot that you create an instance with the keyword new, that show you understand how to use it as it shows as well when you use the append method, Your code for the task is well organised and it is very easy to follow and understand.
Unfortunately , your code for the task 1 doesnt work yet, you are very near thought, I paste my log terminal to help you to find the bug, keep the good work you are almost there! I copy your curl raw to my terminal and run it with bash but either way it doesn’t work, if you have any question you can reach me out on slack:
➜ task-1 curl -X POST http://localhost:3000/users
-H "application/json; charset=UTF-8"
-d
'{
"name": "John Doe",
"email": "[email protected]",
"passowrd": "secret123"
"role": "user",
"active": true,
"department": "Engineering"
}'
curl: option -d: requires parameter
curl: try 'curl --help' or 'curl --manual' for more information
zsh: command not found: {\n "name": "John Doe",\n "email": "[email protected]",\n "passowrd": "secret123"\n "role": "user",\n "active": true,\n "department": "Engineering"\n}
➜ task-1 ./post.sh
zsh: permission denied: ./post.sh
➜ task-1 chmod +x post.sh
➜ task-1 ./post.sh
curl: option -d: requires parameter
curl: try 'curl --help' or 'curl --manual' for more information
./post.sh: line 13: {
"name": "John Doe",
"email": "[email protected]",
"passowrd": "secret123"
"role": "user",
"active": true,
"department": "Engineering"
}: command not found
➜ task-1
No description provided.