Merge "Fetch Jenkins data with credentials included"
diff --git a/web/fetcher.ts b/web/fetcher.ts
index 0988417..0eef435 100644
--- a/web/fetcher.ts
+++ b/web/fetcher.ts
@@ -141,7 +141,7 @@
   async fetchJobInfo(url: string): Promise<Job> {
     let response: Response;
     try {
-      response = await fetch(url);
+      response = await this.fetchFromJenkins(url);
       if (!response.ok) {
         throw response.statusText;
       }
@@ -156,7 +156,7 @@
   }
 
   async fetchBuildInfo(url: string): Promise<BuildDetail> {
-    const response = await fetch(url);
+    const response = await this.fetchFromJenkins(url);
     if (!response.ok) {
       throw response.statusText;
     }
@@ -215,4 +215,9 @@
     };
     return run;
   }
+
+  private fetchFromJenkins(url: string): Promise<Response> {
+    const options: RequestInit = { credentials: 'include' };
+    return fetch(url, options);
+  }
 }