Requesting data from the Github API
✓ Published1🌍 Public
This example demonstrates a simple user-driven data request to the Wikipedia API. It shows how a text input and submit button trigger a `fetch` call to the opensearch endpoint, retrieving and displaying search results based on the submitted subject. The code uses the browser’s built-in `fetch` API to request JSON data, then logs the response and result titles to the console via chained `.then()` promises. The interface includes a loader placeholder and a result article, though the visible rendering of the results is minimal, focusing on the request-response flow.
AI-generated descriptionRequesting data from the Wikipedia API
Concept
An example showing how to go from an API request using fetch
MIT Licensed