Hướng dẫn thử thách
1 / 1
REST API and Web Services Quiz
To pass the quiz, you must correctly answer at least 9 of the 10 questions below.
# --quizzes--
## --quiz--
### --question--
#### --text--
What is the relationship between an API and a web service?
#### --distractors--
Every API is a web service, but not every web service is an API.
---
APIs and web services are identical concepts.
---
Web services only work with REST, while APIs support multiple protocols.
#### --answer--
Every web service is an API, but not every API is a web service.
### --question--
#### --text--
Which HTTP header does a client use to tell the server which response format it wants?
#### --distractors--
`Content-Type`
---
`Authorization`
---
`X-Requested-With`
#### --answer--
`Accept`
### --question--
#### --text--
Which of the following is true about SOAP compared to REST?
#### --distractors--
SOAP uses JSON and is more flexible than REST, making it ideal for modern applications.
---
SOAP is the most widely used web service type today, having replaced REST in most systems.
---
SOAP supports multiple response formats, including plain text, JSON, and binary data.
#### --answer--
SOAP uses only XML and is common in enterprise systems that need stricter standards and security.
### --question--
#### --text--
What does statelessness mean in a REST architecture?
#### --distractors--
The server stores the client's session data between requests.
---
The client keeps no state of its own across requests.
---
REST restricts all requests to read-only operations.
#### --answer--
The server stores no memory of previous requests.
### --question--
#### --text--
Which REST HTTP method is used to remove a resource?
#### --distractors--
`GET`
---
`POST`
---
`PUT`
#### --answer--
`DELETE`
### --question--
#### --text--
In a REST architecture, what is a resource?
#### --distractors--
A function that formats HTTP responses before they are sent to the client.
---
A temporary variable stored in the client's browser.
---
A configuration file that lists the available HTTP methods.
#### --answer--
A piece of data that can be accessed or modified, identified by a URL.
### --question--
#### --text--
Which HTTP status code indicates that a new resource was successfully created?
#### --distractors--
`200`
---
`400`
---
`404`
#### --answer--
`201`
### --question--
#### --text--
What does a `500` status code indicate?
#### --distractors--
The client sent invalid data to the server.
---
The requested resource does not exist.
---
The request was successful.
#### --answer--
An error occurred on the server while processing the request.
### --question--
#### --text--
What is a key advantage of microservices over a monolith?
#### --distractors--
Simpler debugging and fewer network calls between services.
---
A single shared codebase that all teams contribute to.
---
Easier infrastructure management across all services.
#### --answer--
Faster development, better fault isolation, and the ability to use different languages per service.
### --question--
#### --text--
Which of the following is a challenge of adopting a microservices architecture?
#### --distractors--
A single, shared codebase that makes changes easy to coordinate.
---
Fewer network calls are needed between components.
---
Debugging becomes simpler since all code runs in one process.
#### --answer--
Debugging becomes more complex, and there is more network overhead between services.
Vượt qua bài kiểm tra hiện tại để mở khóa bài tiếp theo.
main.sh
UTF-8 • Tab Size: 2Kiểm tra bài:⌘↵