Fix fetch example ... again?

This commit is contained in:
Alex Crichton 2018-08-30 14:26:22 -07:00
parent 90fce8c9d4
commit 14cb2dd4cf

View File

@ -46,7 +46,7 @@ pub fn run() -> Promise {
request_options.method("GET");
request_options.mode(RequestMode::Cors);
let req = Request::new_with_str_and_request_init("https://api.github.com/repos/rustwasm/wasm-bindgen/branches/master", &request_options).unwrap();
let req = Request::new_with_str_and_init("https://api.github.com/repos/rustwasm/wasm-bindgen/branches/master", &request_options).unwrap();
// the RequestInit struct will eventually support setting headers, but that's missing right now
req.headers().set("Accept", "application/vnd.github.v3+json").unwrap();