crkn-rcdr / upholstery

Authorization and abstraction layer for c7a CouchDB databases
0 stars 0 forks source link

Header access needed for CouchDB file uploads. #15

Closed RussellMcOrmond closed 4 years ago

RussellMcOrmond commented 4 years ago

I'm trying to figure out how to access the etag header in a fetch() request, and thus far it is failing.

RussellMcOrmond commented 4 years ago

In perl I've been doing a HEAD call and extracting the revision that way.

If https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Headers won't help, then I will need to do a GET on the full document and use the _rev field. This will be fine for this specific task as documents won't be too large, but is not ideal if we need to do this in the future with larger documents.