emilk / emilk/ehttp

Headers field unused on WASM

Open
#57 1 comment 2 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
396
Forks
36
PR merge metrics
No merged PRs in 30d

Description

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](https://github.com/emilk/ehttp/blob/4e63d731298d5f1411eb96a1f4e480d8bd771d50/ehttp/src/web.rs#L56) 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.