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 JSON and why is it preferred for web API data exchange?
Answer: A lightweight, human-readable text format easy to parse in any language
JSON (JavaScript Object Notation) is a lightweight, human-readable data interchange format supported natively in virtually every programming language.
Which HTTP method is used to retrieve data from a server without modifying state?
Answer: GET
The GET method requests a representation of the specified resource and must not have side effects on server state.
In Python's `requests` library, how do you pass query string parameters in a GET request?
Answer: Using the `params` keyword argument with a dictionary
The `params` keyword in `requests.get()` accepts a dict that gets URL-encoded and appended automatically as the query string.
What does Flask's `jsonify()` function do?
Answer: Converts Python data to a JSON HTTP Response with correct Content-Type
Flask's `jsonify()` serializes Python data to JSON and returns a Response with `Content-Type: application/json` automatically set.
What HTTP status code is returned when a requested resource cannot be found?
Answer: 404
HTTP 404 (Not Found) indicates the server could not locate the requested resource at the given URL.
What is an API endpoint?
Answer: A specific URL where a resource can be accessed to perform an operation
An API endpoint is a specific URL that represents a resource or collection, defining where clients can interact with that resource.