mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Implement the Fetch method
This commit is contained in:
parent
a03a5e814a
commit
3216009731
213 changed files with 1208 additions and 1719 deletions
|
@ -229,6 +229,10 @@ impl Headers {
|
|||
*self.header_list.borrow_mut() = HyperHeaders::new();
|
||||
}
|
||||
|
||||
pub fn set_headers(&self, hyper_headers: HyperHeaders) {
|
||||
*self.header_list.borrow_mut() = hyper_headers;
|
||||
}
|
||||
|
||||
// https://fetch.spec.whatwg.org/#concept-header-extract-mime-type
|
||||
pub fn extract_mime_type(&self) -> Vec<u8> {
|
||||
self.header_list.borrow().get_raw("content-type").map_or(vec![], |v| v[0].clone())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue