-
Notifications
You must be signed in to change notification settings - Fork 22.5k
/
index.md
40 lines (28 loc) · 976 Bytes
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
title: "BackgroundFetchRecord: request property"
short-title: request
slug: Web/API/BackgroundFetchRecord/request
page-type: web-api-instance-property
status:
- experimental
browser-compat: api.BackgroundFetchRecord.request
---
{{APIRef("Background Fetch API")}}{{SeeCompatTable}}{{AvailableInWorkers}}
The **`request`** read-only property of the {{domxref("BackgroundFetchRecord")}} interface returns the details of the resource to be fetched.
## Value
A {{domxref("Request")}}.
## Examples
In this example an individual `BackgroundFetchRecord` is returned using {{domxref("BackgroundFetchManager.fetch()","BackgroundFetchManager.fetch()")}}. The `request` is returned and logged to the console.
```js
bgFetch.match("/ep-5.mp3").then(async (record) => {
if (!record) {
console.log("No record found");
return;
}
console.log(`Here's the request`, record.request);
});
```
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}