Tagged “http”
Entries across every discipline that share this thread.
How-to
Fetch Data in React with useEffect
Load data on mount inside useEffect, storing the result in state and cleaning up to avoid setting state after unmount.
How-toMake a GET Request in JavaScript
Fetch JSON from an API in the browser or Node using the async fetch API.
How-toMake a GET Request in Kotlin
Perform an HTTP GET on Android using the OkHttp client with a coroutine.
How-toMake a GET Request in Python
Fetch JSON from an API using the requests library, raising on error status codes.
How-toMake a GET Request in Swift
Fetch data from a URL using URLSession's async/await API and decode the response.