Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable experimental HTTP/2 support #2246

Merged
merged 2 commits into from
Jun 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* [Using a Proxy](#using-a-proxy)
* [Supported APIs](#getting-supported-apis)
* [TypeScript](#typescript)
* [HTTP/2](#http2)
* [License](#license)
* [Contributing](#contributing)
* [Questions/problems?](#questionsproblems)
Expand Down Expand Up @@ -545,6 +546,18 @@ This library is written in TypeScript, and provides types out of the box. All cl
import { drive_v3 } from 'googleapis';
```

### HTTP/2
This library has **experimental** support for [HTTP/2](https://developers.google.com/web/fundamentals/performance/http2). This support is experimental, and should not be used in production. To enable it for testing purposes, use the `http2` option anywhere request parameters are accepted:

```js
const {google} = require('googleapis');
google.options({
http2: true,
});
```

HTTP/2 is often more performant, as it allows multiplexing of multiple concurrent requests over a single socket. In a traditional HTTP/2 API, the client is directly responsible for opening and closing the sessions made to make requests. To maintain compability with the existing API, this module will automatically re-use existing sessions, which are collected after idling for 500ms. Much of the performance gains will be visible in batch style workloads, and tight loops. To provide feedback on the experimental API surface, please comment on [this issue](https://github.com/googleapis/google-api-nodejs-client/issues/1130).

## Release Notes & Breaking Changes
You can find a detailed list of breaking changes and new features in our [Release Notes][releasenotes]. If you've used this library before `25.x`, see our [Release Notes][releasenotes] to learn about migrating your code from `24.x.x` to `25.x.x`. It's pretty easy :)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
],
"dependencies": {
"google-auth-library": "^6.0.0",
"googleapis-common": "^4.3.0"
"googleapis-common": "^4.4.0"
},
"devDependencies": {
"@compodoc/compodoc": "^1.1.10",
Expand Down
2 changes: 1 addition & 1 deletion src/apis/abusiveexperiencereport/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.3.0"
"googleapis-common": "^4.4.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/apis/abusiveexperiencereport/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
http2: 'empty',
},
module: {
rules: [
Expand Down
2 changes: 1 addition & 1 deletion src/apis/acceleratedmobilepageurl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.3.0"
"googleapis-common": "^4.4.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/apis/acceleratedmobilepageurl/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
http2: 'empty',
},
module: {
rules: [
Expand Down
2 changes: 1 addition & 1 deletion src/apis/accessapproval/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.3.0"
"googleapis-common": "^4.4.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/apis/accessapproval/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
http2: 'empty',
},
module: {
rules: [
Expand Down
2 changes: 1 addition & 1 deletion src/apis/accesscontextmanager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.3.0"
"googleapis-common": "^4.4.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/apis/accesscontextmanager/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
http2: 'empty',
},
module: {
rules: [
Expand Down
2 changes: 1 addition & 1 deletion src/apis/adexchangebuyer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.3.0"
"googleapis-common": "^4.4.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/apis/adexchangebuyer/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
http2: 'empty',
},
module: {
rules: [
Expand Down
2 changes: 1 addition & 1 deletion src/apis/adexchangebuyer2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.3.0"
"googleapis-common": "^4.4.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/apis/adexchangebuyer2/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
http2: 'empty',
},
module: {
rules: [
Expand Down
2 changes: 1 addition & 1 deletion src/apis/adexperiencereport/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.3.0"
"googleapis-common": "^4.4.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/apis/adexperiencereport/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
http2: 'empty',
},
module: {
rules: [
Expand Down
2 changes: 1 addition & 1 deletion src/apis/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.3.0"
"googleapis-common": "^4.4.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/apis/admin/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
http2: 'empty',
},
module: {
rules: [
Expand Down
2 changes: 1 addition & 1 deletion src/apis/admob/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.3.0"
"googleapis-common": "^4.4.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/apis/admob/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
http2: 'empty',
},
module: {
rules: [
Expand Down
2 changes: 1 addition & 1 deletion src/apis/adsense/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.3.0"
"googleapis-common": "^4.4.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/apis/adsense/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
http2: 'empty',
},
module: {
rules: [
Expand Down
2 changes: 1 addition & 1 deletion src/apis/adsensehost/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.3.0"
"googleapis-common": "^4.4.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/apis/adsensehost/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
http2: 'empty',
},
module: {
rules: [
Expand Down
2 changes: 1 addition & 1 deletion src/apis/alertcenter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.3.0"
"googleapis-common": "^4.4.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/apis/alertcenter/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
http2: 'empty',
},
module: {
rules: [
Expand Down
2 changes: 1 addition & 1 deletion src/apis/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.3.0"
"googleapis-common": "^4.4.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/apis/analytics/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
http2: 'empty',
},
module: {
rules: [
Expand Down
2 changes: 1 addition & 1 deletion src/apis/analyticsreporting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.3.0"
"googleapis-common": "^4.4.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/apis/analyticsreporting/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
http2: 'empty',
},
module: {
rules: [
Expand Down
2 changes: 1 addition & 1 deletion src/apis/androiddeviceprovisioning/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.3.0"
"googleapis-common": "^4.4.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/apis/androiddeviceprovisioning/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
http2: 'empty',
},
module: {
rules: [
Expand Down
2 changes: 1 addition & 1 deletion src/apis/androidenterprise/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.3.0"
"googleapis-common": "^4.4.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/apis/androidenterprise/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
http2: 'empty',
},
module: {
rules: [
Expand Down
2 changes: 1 addition & 1 deletion src/apis/androidmanagement/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.3.0"
"googleapis-common": "^4.4.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/apis/androidmanagement/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
http2: 'empty',
},
module: {
rules: [
Expand Down
2 changes: 1 addition & 1 deletion src/apis/androidpublisher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.3.0"
"googleapis-common": "^4.4.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/apis/androidpublisher/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
http2: 'empty',
},
module: {
rules: [
Expand Down
2 changes: 1 addition & 1 deletion src/apis/appengine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.3.0"
"googleapis-common": "^4.4.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/apis/appengine/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
http2: 'empty',
},
module: {
rules: [
Expand Down
2 changes: 1 addition & 1 deletion src/apis/appsactivity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.3.0"
"googleapis-common": "^4.4.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/apis/appsactivity/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
http2: 'empty',
},
module: {
rules: [
Expand Down
2 changes: 1 addition & 1 deletion src/apis/artifactregistry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.3.0"
"googleapis-common": "^4.4.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/apis/artifactregistry/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
http2: 'empty',
},
module: {
rules: [
Expand Down