-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
To track this TODO
wordpress-rs/wp_api/src/request.rs
Lines 62 to 67 in 2b572dd
// TODO: We probably want to implement a specific type for these headers instead of using a | |
// regular HashMap. | |
// | |
// It could be something similar to `reqwest`'s [`header`](https://docs.rs/reqwest/latest/reqwest/header/index.html) | |
// module. | |
pub header_map: Option<HashMap<String, String>>, |
HashMap is not suitable for storing HTTP headers, since header name can repeat. For example, HTTP responses can contain multiple Link
headers:
Finally, this header field:
Link: https://example.org/; rel="start",
https://example.org/index; rel="index"is equivalent to these:
Link: https://example.org/; rel="start"
Link: https://example.org/index; rel="index"