Bird
0
0

Why does the browsable API interface use HTML forms for POST requests instead of sending raw JSON?

hard📝 Conceptual Q10 of 15
Django - REST Framework Basics
Why does the browsable API interface use HTML forms for POST requests instead of sending raw JSON?
ABecause JSON is not supported by Django REST Framework
BTo allow easy testing and submission via web browsers without extra tools
CTo improve API performance by using forms
DTo prevent CSRF attacks automatically
Step-by-Step Solution
Solution:
  1. Step 1: Understand browsable API design goal

    The browsable API aims to make API testing easy in browsers by using HTML forms for input.
  2. Step 2: Evaluate other options

    JSON is supported by DRF (A is false). Forms do not improve performance (C false). CSRF protection is separate (D false).
  3. Final Answer:

    To allow easy testing and submission via web browsers without extra tools -> Option B
  4. Quick Check:

    Forms in browsable API = easy browser testing [OK]
Quick Trick: Forms let browsers test APIs without extra tools [OK]
Common Mistakes:
MISTAKES
  • Thinking JSON is unsupported by DRF
  • Believing forms improve performance or prevent CSRF

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Django Quizzes