0
0
Rest APIprogramming~5 mins

First API request and response in Rest API - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is an API request?
An API request is a message sent from a client to a server asking for some data or action. It usually includes a URL, method (like GET or POST), and sometimes data.
Click to reveal answer
beginner
What does an API response contain?
An API response is the message the server sends back after receiving a request. It usually contains a status code (like 200 for success) and the data requested or a message.
Click to reveal answer
beginner
What HTTP method is commonly used to get data from an API?
The GET method is used to ask the server to send data without changing anything on the server.
Click to reveal answer
beginner
What does a 404 status code mean in an API response?
A 404 status code means the server could not find the requested resource or URL.
Click to reveal answer
beginner
Why is JSON commonly used in API responses?
JSON is easy to read and write for both humans and computers. It is a simple text format that works well to send data between client and server.
Click to reveal answer
Which HTTP method is used to retrieve data from an API?
AGET
BPOST
CDELETE
DPUT
What does a 200 status code in an API response mean?
AResource not found
BRequest successful
CServer error
DUnauthorized access
What format is commonly used to send data in API responses?
AJSON
BXML
CHTML
DCSV
If you get a 404 status code, what does it mean?
ASuccess
BBad request
CServer error
DResource not found
What part of an API request tells the server what action to perform?
AURL
BHeaders
CHTTP method
DBody
Explain what happens when you make your first API request.
Think about the conversation between your app and the server.
You got /5 concepts.
    Describe the role of status codes in API responses.
    Status codes are like traffic lights for your request.
    You got /3 concepts.