jlengstorfJ
Convex Community3y ago
8 replies
jlengstorf

fetch not following redirects

quick question about the HTTP Actions: I'm getting some inconsistencies in how the Fetch API works, and I'm not sure if they're expected

I have a shortlink, and if I fetch it, I would expect it to follow that redirect and then set
req.url
to the target URL. in Node, this happens how I expect. in Convex, I'm still getting the shortlink in
req.url


const res = await fetch('https://example.com/shortlink');
const headers = res.headers;

console.log(res.url);


is this intended behavior?
Was this page helpful?