plz.el icon indicating copy to clipboard operation
plz.el copied to clipboard

Expose response headers with `:as file` and `:as buffer`

Open josephmturner opened this issue 1 year ago • 2 comments

Currently, it's not possible to access response headers when sending GET requests :as file. Is there a backward-compatible way to support this?

josephmturner avatar Jun 13 '24 05:06 josephmturner

I'm not sure what you mean by backward-compatible here. It would need to be specified as a new value for :as, maybe something like :as '(response :with file), :as '(response :with buffer), etc. Hard to say what the best way to do it is.

alphapapa avatar Jun 13 '24 05:06 alphapapa

:as '(response :with file) and :as '(response :with buffer) make sense! My concern about backward-compatibility would only be relevant if we attempted to change the existing :as 'file handler to also return headers. Moot point. :)

josephmturner avatar Jun 13 '24 18:06 josephmturner