Skip to content

HTTP/2 option ignore timeout option #3187

@gring2

Description

@gring2

Environment details

  • OS:
  • Node.js version: 18.15.0
  • npm version: 9.5.0
  • googleapis version: 112.0.0

Steps to reproduce

  1. set http2 and timeout options to google.options
google.options({http2: true, timeout: 1})
  1. send any request to google apis
google.calendar().events.list({calendarId: ${calendarId}})

I expect api request fails.because it has very short timeout but i got response successfully unlike request through HTTP/1.1
I guess googleapi-common library does not fully support options. because I tested googleapi-common http2 module, the module ignored timeout config.

test code comparing http2 module to node-fetch module

import { request } from 'googleapis-common/build/src/http2';
import nodefetch from 'node-fetch';

request({
  timeout: 1,
  url: 'https://www.google.com',
  headers: { timeout: 1 },
}).then((r) => {
  console.log(r);
});

nodefetch('https://www.google.com', { timeout: 1 }).catch(console.error);

Metadata

Metadata

Assignees

Labels

priority: p3Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions