POC Web Development & APIs Flashcards
6 cards from real POC practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 6 POC Web Development & APIs flashcards as text
What is the purpose of HTTP headers in a web request or response?
Answer: To pass metadata such as content type, authentication tokens, and caching instructions
HTTP headers carry metadata about the request or response, including content negotiation, authentication, and cache control directives.
In Python's `requests` library, how do you add custom headers to an HTTP request?
Answer: Using the `headers` keyword argument with a dictionary
Pass a dict of header name-value pairs to the `headers` parameter, e.g., `requests.get(url, headers={'Authorization': 'Bearer token'})`.
What does the stateless constraint mean in a RESTful API?
Answer: Each request must contain all information needed to process it with no server-side session state
Statelessness means the server stores no client session information; every request is fully self-contained with all context it needs.
Which Python web framework is known for its 'batteries included' philosophy with built-in ORM, admin panel, and authentication?
Answer: Django
Django follows a 'batteries included' philosophy, shipping with an ORM, admin interface, authentication, and many other built-in features.
What does CRUD stand for in the context of web APIs?
Answer: Create, Read, Update, Delete
CRUD describes the four fundamental data operations: Create, Read, Update, Delete — mapping to HTTP POST, GET, PUT/PATCH, and DELETE.
What does the `response.json()` method return in the `requests` library?
Answer: A Python dict or list parsed from the response body JSON
`response.json()` decodes the HTTP response body as JSON and returns the corresponding Python object (dict, list, etc.).