message: Patched bug causing duplicate requests on startup
diff: @@ -61,10 +61,12 @@ pub fn preview(
  "https://cloudflareworkers.com/?wrangler_session_id={0}&wrangler_ws_port={1}&hide_editor#{2}:{3}",
  session, ws_port, script_id, browser_url
  ))?;
  - }
  + message::preview("Your Worker is a Workers Site, please preview it in browser window.");
  + } else {
  // Make a the initial request to the URL
  - client_request(&request_payload, &script_id, &headless);
  + client_request(&request_payload, &script_id);
  + }
  let broadcaster = server.broadcaster();
  thread::spawn(move || server.run());
  @@ -82,9 +84,11 @@ pub fn preview(
  "https://cloudflareworkers.com/?hide_editor#{0}:{1}",
  script_id, browser_url
  ))?;
  - }
  - client_request(&request_payload, &script_id, &headless);
  + message::preview("Your Worker is a Workers Site, please preview it in browser window.");
  + } else {
  + client_request(&request_payload, &script_id);
  + }
  }
  Ok(())
  @@ -106,7 +110,7 @@ fn open_browser(url: &str) -> Result<(), failure::Error> {
  Ok(())
  }
  -fn client_request(payload: &RequestPayload, script_id: &String, headless: &bool) {
  +fn client_request(payload: &RequestPayload, script_id: &String) {
  let client = http::client(None);
  let method = &payload.method;
  @@ -120,11 +124,7 @@ fn client_request(payload: &RequestPayload, script_id: &String, headless: &bool)
  HTTPMethod::Post => post(&url, &cookie, &body, &client).unwrap(),
  };
  - let msg = if !*headless {
  - "Your Worker is a Workers Site, please preview it in browser window.".to_string()
  - } else {
  - format!("Your Worker responded with: {}", worker_res)
  - };
  + let msg = format!("Your Worker responded with: {}", worker_res);
  message::preview(&msg);
  }
  @@ -188,7 +188,7 @@ fn watch_for_changes(
  }
  }
  - client_request(&request_payload, &script_id, &headless);
  + client_request(&request_payload, &script_id);
  }
  }
  