emilk / ehttp

Minimal Rust HTTP client for both native and WASM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Headers field unused on WASM

Strosel opened this issue · comments

It seems that the headers field of the Request struct remains unused when compiling to WASM. From what I can tell this is because they are set via a getter here and therefore remain unused.

From a quick glance at the web-sys docs the correct way to set headers is by passing a Headers struct to the RequestInit instead. I might be able to test this and make a PR later this week.