nerdexam
Cisco

200-901 · Question #57

Which command tests a REST API?

The correct answer is C. curl. The curl command-line tool is the standard utility for sending HTTP requests to REST APIs, allowing users to specify methods, headers, and body data to test endpoints.

Understanding and Using APIs

Question

Which command tests a REST API?

Options

  • Anc
  • Btcpdump
  • Ccurl
  • Dtelnet

How the community answered

(35 responses)
  • A
    3% (1)
  • B
    6% (2)
  • C
    91% (32)

Why each option

The curl command-line tool is the standard utility for sending HTTP requests to REST APIs, allowing users to specify methods, headers, and body data to test endpoints.

Anc

nc (netcat) is a raw TCP/UDP networking utility; while it can send raw data, it does not understand HTTP semantics or REST and is not used for REST API testing.

Btcpdump

tcpdump is a packet capture tool used for network traffic analysis; it passively captures packets and does not send HTTP requests.

CcurlCorrect

curl supports all HTTP methods (GET, POST, PUT, DELETE, PATCH) and allows specification of headers, authentication tokens, request bodies, and SSL options via command-line flags, making it the de facto tool for manually testing and debugging REST API endpoints. Its output displays the raw HTTP response including headers and body, which is essential for verifying API behavior.

Dtelnet

telnet is used to establish raw TCP connections for troubleshooting connectivity; it does not provide HTTP method support or REST API testing capabilities.

Concept tested: Using curl to test REST API endpoints

Source: https://curl.se/docs/manpage.html

Topics

#REST API#API testing#curl command#HTTP client

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice