Philip Walton
CDCloudflare Developers
•Created by Philip Walton on 6/19/2024 in #pages-help
Differences between fetch() and env.ASSETS.fetch()
Is there any documentation on the differences between these two functions? I'm migrating a site from Workers to Pages (with functions), and I'm seeing test failures that I tracked down to subtle differences between how these two methods handle
ETag
headers.
For example, it looks like fetch()
will strip ETag
headers by default, whereas env.ASSETS.fetch()
will not. It's easy enough for me to remove the ETag
header myself, but I'm concerned that there are other behavior differences that I might not be aware of.19 replies