Currently, the problem of db.create("id", exists_ok=True) is that it
adds a useless HTTP call if the file already exists:
await doc._exists() HEAD /db/id 200 OK
await doc.fetch() GET /db/id 200 OK
I propose to remove the first (useless) HEAD request when we're sure we
want to get the full document (exists_ok=True). And keep the
lightweight HEAD request when we don't care about its contents
(exists_ok=False).
Currently, the problem of
db.create("id", exists_ok=True)
is that it adds a useless HTTP call if the file already exists:I propose to remove the first (useless) HEAD request when we're sure we want to get the full document (
exists_ok=True
). And keep the lightweight HEAD request when we don't care about its contents (exists_ok=False
).