Last active
February 10, 2023 02:59
-
-
Save marr/4243d2bd64f9c0abe8b1f135ae7c7eb6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ofetch } from "../dist/node.mjs"; | |
let body; | |
body = { x: 1 }; // request body is "[object Object]" | |
// body = JSON.stringify(body); // request body is correctly received | |
const url ='https://d0348819-d0b4-4913-b739-360dfe6e0eef.mock.pstmn.io/debug'; | |
const response = await ofetch(url, { body, method: "PATCH" }); | |
console.log(response); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment