Responses interview questions

18 real Responses questions from the FastAPI bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

1. What is response_model?

Junior
  1. A.the response class returned directly when you need full control over body, status code, and headers as raw JSON
  2. B.the decorator argument declaring the output schema used to validate, filter, and document what an endpoint returns
  3. C.extra header values added by typing a Response parameter and assigning to its headers mapping inside the handler
  4. D.the effect of declaring an output schema, where attributes not present in that schema are stripped from the returned data
Reveal the answer + AI explanation — free account

2. Which term means: "the decorator argument declaring the output schema used to validate, filter, and document what an endpoint returns"?

Junior
  1. A.JSONResponse
  2. B.response_class
  3. C.response_model_exclude_unset
  4. D.response_model
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Junior
  1. A.response_model — the effect of declaring an output schema, where attributes not present in that schema are stripped from the returned data
  2. B.response_model — the option that omits fields left at their defaults so only values explicitly provided appear in the output
  3. C.response_model — the response class returned directly when you need full control over body, status code, and headers as raw JSON
  4. D.response_model — the decorator argument declaring the output schema used to validate, filter, and document what an endpoint returns
Reveal the answer + AI explanation — free account

4. What is Output field filtering?

Mid
  1. A.the decorator argument declaring the output schema used to validate, filter, and document what an endpoint returns
  2. B.the decorator argument that changes the default container for the body, for example to plain text or HTML instead of JSON
  3. C.the effect of declaring an output schema, where attributes not present in that schema are stripped from the returned data
  4. D.extra header values added by typing a Response parameter and assigning to its headers mapping inside the handler
Reveal the answer + AI explanation — free account

5. Which term means: "the effect of declaring an output schema, where attributes not present in that schema are stripped from the returned data"?

Mid
  1. A.JSONResponse
  2. B.Custom response headers
  3. C.Output field filtering
  4. D.response_model_exclude_unset
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Mid
  1. A.Output field filtering — the option that omits fields left at their defaults so only values explicitly provided appear in the output
  2. B.Output field filtering — the response class returned directly when you need full control over body, status code, and headers as raw JSON
  3. C.Output field filtering — extra header values added by typing a Response parameter and assigning to its headers mapping inside the handler
  4. D.Output field filtering — the effect of declaring an output schema, where attributes not present in that schema are stripped from the returned data
Reveal the answer + AI explanation — free account

7. What is JSONResponse?

Mid
  1. A.the response class returned directly when you need full control over body, status code, and headers as raw JSON
  2. B.the decorator argument declaring the output schema used to validate, filter, and document what an endpoint returns
  3. C.the option that omits fields left at their defaults so only values explicitly provided appear in the output
  4. D.the decorator argument that changes the default container for the body, for example to plain text or HTML instead of JSON
Reveal the answer + AI explanation — free account

8. Which term means: "the response class returned directly when you need full control over body, status code, and headers as raw JSON"?

Mid
  1. A.response_model
  2. B.response_model_exclude_unset
  3. C.JSONResponse
  4. D.Output field filtering
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Mid
  1. A.JSONResponse — the response class returned directly when you need full control over body, status code, and headers as raw JSON
  2. B.JSONResponse — the decorator argument that changes the default container for the body, for example to plain text or HTML instead of JSON
  3. C.JSONResponse — the decorator argument declaring the output schema used to validate, filter, and document what an endpoint returns
  4. D.JSONResponse — the effect of declaring an output schema, where attributes not present in that schema are stripped from the returned data
Reveal the answer + AI explanation — free account

10. What is response_model_exclude_unset?

Mid
  1. A.the option that omits fields left at their defaults so only values explicitly provided appear in the output
  2. B.the response class returned directly when you need full control over body, status code, and headers as raw JSON
  3. C.the effect of declaring an output schema, where attributes not present in that schema are stripped from the returned data
  4. D.the decorator argument that changes the default container for the body, for example to plain text or HTML instead of JSON
Reveal the answer + AI explanation — free account

11. Which term means: "the option that omits fields left at their defaults so only values explicitly provided appear in the output"?

Mid
  1. A.response_model_exclude_unset
  2. B.Output field filtering
  3. C.JSONResponse
  4. D.Custom response headers
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Mid
  1. A.response_model_exclude_unset — the option that omits fields left at their defaults so only values explicitly provided appear in the output
  2. B.response_model_exclude_unset — extra header values added by typing a Response parameter and assigning to its headers mapping inside the handler
  3. C.response_model_exclude_unset — the decorator argument declaring the output schema used to validate, filter, and document what an endpoint returns
  4. D.response_model_exclude_unset — the response class returned directly when you need full control over body, status code, and headers as raw JSON
Reveal the answer + AI explanation — free account

13. What is Custom response headers?

Mid
  1. A.the decorator argument declaring the output schema used to validate, filter, and document what an endpoint returns
  2. B.extra header values added by typing a Response parameter and assigning to its headers mapping inside the handler
  3. C.the response class returned directly when you need full control over body, status code, and headers as raw JSON
  4. D.the effect of declaring an output schema, where attributes not present in that schema are stripped from the returned data
Reveal the answer + AI explanation — free account

14. Which term means: "extra header values added by typing a Response parameter and assigning to its headers mapping inside the handler"?

Mid
  1. A.response_model
  2. B.response_model_exclude_unset
  3. C.Custom response headers
  4. D.response_class
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Mid
  1. A.Custom response headers — the response class returned directly when you need full control over body, status code, and headers as raw JSON
  2. B.Custom response headers — the option that omits fields left at their defaults so only values explicitly provided appear in the output
  3. C.Custom response headers — the effect of declaring an output schema, where attributes not present in that schema are stripped from the returned data
  4. D.Custom response headers — extra header values added by typing a Response parameter and assigning to its headers mapping inside the handler
Reveal the answer + AI explanation — free account

16. What is response_class?

Senior
  1. A.the decorator argument declaring the output schema used to validate, filter, and document what an endpoint returns
  2. B.the response class returned directly when you need full control over body, status code, and headers as raw JSON
  3. C.the decorator argument that changes the default container for the body, for example to plain text or HTML instead of JSON
  4. D.the effect of declaring an output schema, where attributes not present in that schema are stripped from the returned data
Reveal the answer + AI explanation — free account

17. Which term means: "the decorator argument that changes the default container for the body, for example to plain text or HTML instead of JSON"?

Senior
  1. A.response_model_exclude_unset
  2. B.JSONResponse
  3. C.Custom response headers
  4. D.response_class
Reveal the answer + AI explanation — free account

18. Which statement is correct?

Senior
  1. A.response_class — the decorator argument that changes the default container for the body, for example to plain text or HTML instead of JSON
  2. B.response_class — the effect of declaring an output schema, where attributes not present in that schema are stripped from the returned data
  3. C.response_class — extra header values added by typing a Response parameter and assigning to its headers mapping inside the handler
  4. D.response_class — the response class returned directly when you need full control over body, status code, and headers as raw JSON
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Responses free