Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wbamberg committed Jun 25, 2024
1 parent ace0483 commit 4bfd4d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions files/en-us/web/api/request/integrity/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ where `<hash-algo>` may be any of: `sha256`, `sha384`, or `sha512`, and `<hash-s

This format is not checked when the request is constructed, but only when the resource is fetched and checked.

If the `integrity` has not been set, the property returns `''`.
If `integrity` has not been set, the property returns `''`.

## Examples

In the following snippet, we create a new request using the {{domxref("Request/Request", "Request()")}} constructor, passing the `integrity` option:
In the following example, we create a new request using the {{domxref("Request/Request", "Request()")}} constructor, passing the `integrity` option:

```js
const url = "https://example.org/get";
Expand All @@ -49,7 +49,7 @@ async function get(request) {
}
```

When the request is made, the browser computes the SHA-384 {{glossary("Cryptographic_hash_function", "hash")}} of the fetched resource, and if the result does not match the value specified in `integrity`, the browser rejects the fetch request.
When the request is made, the browser computes the SHA-384 {{glossary("Cryptographic_hash_function", "hash")}} of the fetched resource, and if the result does not match the value specified in `integrity`, the browser will reject the fetch request.

## Specifications

Expand Down

0 comments on commit 4bfd4d8

Please sign in to comment.