debugFullRequest()function
debugFullRequest(request: Request): Promise<string>
| Param | Type | |
|---|---|---|
request | Request | The Request to debug. required |
| Return | |
|---|---|
Promise<string> | A promise resolving to the request line, headers, and body as a string. |
Debug a full Request as a string including its body.
- Clones the request before reading the body so the original request can still be sent or parsed later.
- Omits the body section when the request body is empty.
Examples
await debugFullRequest(new Request("https://x.com")) // "GET https://x.com/"