350-401 · Question #983
What is a command-line tool for consuming REST APIs?
The correct answer is C. cURL. cURL is a command-line tool used to transfer data to or from a server, making it ideal for consuming and testing REST APIs directly from the terminal using commands like curl https://api.example.com. Why the distractors are wrong: Python requests (A) is a library, not a command-l
Question
What is a command-line tool for consuming REST APIs?
Options
- APython requests
- BPostman
- CcURL
- DFirefox
How the community answered
(67 responses)- A1% (1)
- B7% (5)
- C87% (58)
- D4% (3)
Explanation
cURL is a command-line tool used to transfer data to or from a server, making it ideal for consuming and testing REST APIs directly from the terminal using commands like curl https://api.example.com.
Why the distractors are wrong:
- Python requests (A) is a library, not a command-line tool - it requires writing Python code within a script or interpreter.
- Postman (B) is a popular REST API client but operates through a graphical user interface (GUI), not the command line.
- Firefox (D) is a web browser; while it can make basic GET requests via the address bar, it is not a command-line tool and is not designed for consuming REST APIs.
Memory Tip: Think of the "C" in cURL standing for "Command-line" - it's the go-to CLI tool for REST APIs. A handy phrase: "cURL curls data from the command line."
Topics
Community Discussion
No community discussion yet for this question.