Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.

Commit 1ac424e

Browse files
authored
fix: sample app TypeError (#1257)
App sample has error: TypeError: The `GET` method cannot be used with a body This pull request is to update the body to an json response option Fixes #1246 🦕
1 parent ad02efb commit 1ac424e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

samples/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const DISCOVERY_URL = 'https://www.googleapis.com/discovery/v1/apis';
3131
app.get('/', async (req, res) => {
3232
// This outgoing HTTP request should be captured by Trace
3333
try {
34-
const {body} = await got(DISCOVERY_URL, {json: true});
34+
const {body} = await got(DISCOVERY_URL, {responseType: 'json'});
3535
const names = body.items.map(item => item.name);
3636
res.status(200).send(names.join('\n')).end();
3737
} catch (err) {

0 commit comments

Comments
 (0)