Call an API from the terminal with curl
QuizMediumAsked in: GreyOrange
Which curl command sends a JSON body with POST and shows the response status line and headers as well as the body?
- curl -i -X POST -H "Content-Type: application/json" -d '{"name":"Asha"}' https://api.example.com/users
- curl https://api.example.com/users {"name":"Asha"}
- curl -get -json https://api.example.com/users
- curl -o POST https://api.example.com/users
This question is part of Pro+
Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.