When I fetch this URL, which doesn't have the trailing slash:
const url = "https://www.inkandswitch.com/local-first";
const fetchResult = await fetch(url);
console.log("Status:", fetchResult.status);
console.log("HTML:", await fetchResult.text());
The result is:
Status: 200
HTML: <!DOCTYPE html><html><head><title>https://www.inkandswitch.com/local-first/</title><link rel="canonical" href="https://www.inkandswitch.com/local-first/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://www.inkandswitch.com/local-first/" /></head></html>
That's it. No redirect to the canonical URL. However, if you request it from the browser, it can still be redirected to the canonical one. I wonder why would they not return the redirect code?
fetch
function can still redirect to the correct resource