Response<string>
returned rather than a json response.
...
Should return a response with a json()
method, like in the repo readme example.
{
"name": "test",
"version": "1.0.0",
"description": "",
"exports": "./index.js",
"type": "module",
"scripts": {
"start": "node --loader ts-node/esm ./src/index.ts"
},
"author": "",
"license": "ISC",
"devDependencies": {
"@types/got": "^9.6.12",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.1",
"typescript": "^5.3.2"
},
"dependencies": {
"got": "^14.0.0"
}
}
index.ts
import got from "got";
async function main() {
const response = await got.post("https://httpbin.org/anything", {
json: {
hello: "world",
},
});
console.log(response);
console.log(response.json());
}
main();
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too