正在学习
Bug: The loop reassigns total instead of accumulating.
Endpoints
GET /hello
Returns a personalized greeting.
Query Parameters
| Name | Type | Required | Description |
|------|------|-----------|-------------|
| name | string | Yes | The name to include in the greeting |
Example Request
GET /hello?name=Alice
Example Response
```json
{
"message": "Hello, Alice!"
}
练习题
What is the purpose of the GET /hello endpoint?
A. To return a list of users
B. To return a personalized greeting
C. To update user information
D. To delete a user
Which query parameter is required for the GET /hello endpoint?
A.
idB.
emailC.
nameD.
ageWhat are the components of the example response for the GET /hello endpoint? (Select all that apply)
A.
statusB.
messageC.
codeD. The personalized greeting
The GET /hello endpoint requires a query parameter named username.
The GET /hello endpoint returns a JSON response.
The query parameter for the GET /hello endpoint that specifies the name to include in the greeting is ___.
The response from the GET /hello endpoint contains a field named ___.
What is the format of the example request for the GET /hello endpoint?
Describe the purpose and required parameter of the GET /hello endpoint.
Which of the following are true about the GET /hello endpoint? (Select all that apply)
A. It returns a personalized greeting.
B. It requires the
id query parameter.C. It returns a JSON response.
D. It uses the POST method.
When documenting the GET /hello endpoint, which key aspect from effective documentation should be emphasized to ensure clarity for users?
A. The tone and depth should be technical, focusing on internal developers only.
B. The structure should follow Overview → Setup → Usage → Examples → Notes.
C. The data sources should include only test results.
D. The documentation format should be plain text only.
When generating Markdown documentation for the GET /hello endpoint, which elements should be included to make it complete and ready to publish?
A. Overview of the endpoint's purpose
B. Detailed description of the query parameters
C. Request and response examples
D. Error handling notes
E. The programming language used to implement the endpoint
The documentation for the GET /hello endpoint should include the framework and programming language used to implement it, as this is a key requirement for backend prompts.
When documenting the GET /hello endpoint, the ___ should clearly describe that the endpoint returns a personalized greeting based on the provided name query parameter.
登录后解锁笔记、知识点解析、AI 问答
立即登录