You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Data Layer: Add helper to GET data from generic URL (#28867)
See #28304
In this patch we're adding a small helper to be used to get raw
information from a given URL though a `GET` request.
The way we'd use this is inside of the `waitForData()` function. This is
meant to obscure the global http-data ID so that the user doesn't need
to worry about it.
```js
waitForData( {
planets: requestFromUrl( 'https://swapi.co/api/planets/' ),
} ).then( ( { planets } ) => {
console.log( planets.data );
} );
```
0 commit comments