応答オブジェクトメソッド
1683 ワード
Response.ok
The ok
read-only property of the Response interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.
Value
A boolean value.
Response.json()
The json()
method of the Response interface takes a Response stream and reads it to completion. It returns a promise which resolves with the result of parsing the body text as JSON .
Note that despite the method being named json()
, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.
JSONではなく、入力出力javascriptオブジェクトとしてJSONを受信する方法です.
Syntax
response.json().then(data => {
// do something with your data
});
Copy to Clipboard
Parameters
None.
Return value
A Promise that resolves to a JavaScript object. This object could be anything that can be represented by JSON — an object, an array, a string, a number...
Reference
この問題について(応答オブジェクトメソッド), 我々は、より多くの情報をここで見つけました
https://velog.io/@hqillz/Response-객체-메소드
テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol
The
json()
method of the Response interface takes a Response stream and reads it to completion. It returns a promise which resolves with the result of parsing the body text as JSON .Note that despite the method being named
json()
, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.JSONではなく、入力出力javascriptオブジェクトとしてJSONを受信する方法です.
Syntax
response.json().then(data => {
// do something with your data
});
Copy to ClipboardParameters
None.
Return value
A Promise that resolves to a JavaScript object. This object could be anything that can be represented by JSON — an object, an array, a string, a number...
Reference
この問題について(応答オブジェクトメソッド), 我々は、より多くの情報をここで見つけました https://velog.io/@hqillz/Response-객체-메소드テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol