Closed adrianhm13 closed 2 years ago
For the URL I think I've found it.
import apiFetch from "@wordpress/api-fetch";
apiFetch.use(apiFetch.createRootURLMiddleware("https://example.com"));
the paths from some the blocks still a mystery to me, and not sure if it can be changed :/
Hi folks,
I've been trying to change the root URL from the fetch handler where some of the blocks makes requests to get data. I'd like to change this "root" and endpoints for a custom ones but the only thing I could find it's the function setFetchHandler() from the module api-fetch. That function as the name points, it's to change the entire function and I can't find a way to modify these values.