Request: body プロパティ
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
メモ: この機能はウェブワーカー内で利用可能です。
body
は Request
インターフェイスの読み取り専用プロパティで、リクエストに追加された本体のコンテンツを含む ReadableStream
を保持します。 GET
や HEAD
メソッドを使用したリクエストは本体を持つことができず、その場合は null
が返されることに注意してください。
値
ReadableStream
または null
。
例
js
const request = new Request("/myEndpoint", {
method: "POST",
body: "Hello world",
});
request.body; // ReadableStream
仕様書
Specification |
---|
Fetch # ref-for-dom-body-body① |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
body |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.