From 980fe00a74a9ad013b945755415ace2e5429c3c2 Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Wed, 27 Oct 2021 02:31:24 +0300 Subject: [RU] Remove notranslate (#2874) --- files/ru/web/api/request/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'files/ru/web/api/request/index.html') diff --git a/files/ru/web/api/request/index.html b/files/ru/web/api/request/index.html index 7245130a9e..ddf3cef81b 100644 --- a/files/ru/web/api/request/index.html +++ b/files/ru/web/api/request/index.html @@ -94,7 +94,7 @@ translation_of: Web/API/Request

In the following snippet, we create a new request using the Request() constructor (for an image file in the same directory as the script), then return some property values of the request:

-
const request = new Request('https://www.mozilla.org/favicon.ico');
+
const request = new Request('https://www.mozilla.org/favicon.ico');
 
 const URL = request.url;
 const method = request.method;
@@ -103,7 +103,7 @@ const credentials = request.credentials;
 
 

You could then fetch this request by passing the Request object in as a parameter to a {{domxref("WindowOrWorkerGlobalScope.fetch()")}} call, for example:

-
fetch(request)
+
fetch(request)
   .then(response => response.blob())
   .then(blob => {
     image.src = URL.createObjectURL(blob);
@@ -111,7 +111,7 @@ const credentials = request.credentials;
 
 

In the following snippet, we create a new request using the Request() constructor with some initial data and body content for an api request which need a body payload:

-
const request = new Request('https://example.com', {method: 'POST', body: '{"foo": "bar"}'});
+
const request = new Request('https://example.com', {method: 'POST', body: '{"foo": "bar"}'});
 
 const URL = request.url;
 const method = request.method;
@@ -127,7 +127,7 @@ const bodyUsed = request.bodyUsed;
 
 

Вы можете получить этот запрос API, передав объект Request в качестве параметра для вызова {{domxref("WindowOrWorkerGlobalScope.fetch()")}}, например, и получить ответ:

-
fetch(request)
+
fetch(request)
   .then(response => {
     if (response.status === 200) {
       return response.json();
-- 
cgit v1.2.3-54-g00ecf