Fetches an entity from the specified URL.
The WordPress URL.
Callback function to handle redirect responses.
Callback function to handle not found responses.
The slug of the entity to fetch.
The fetched entity or null if there was an error.
Fetches an entity from the specified URL.