Title: _next method creates a HTTP request with wrong content-length header · Issue #1403 · googleapis/google-api-python-client · GitHub
Open Graph Title: _next method creates a HTTP request with wrong content-length header · Issue #1403 · googleapis/google-api-python-client
X Title: _next method creates a HTTP request with wrong content-length header · Issue #1403 · googleapis/google-api-python-client
Description: Using google-api-python-client 2.2.0 and the GCP monitoring API, I received an error when retrieving the second page of a projects.timeSeries.query call: can't fetch data, reason: Invalid JSON payload received. Unexpected end of string. ...
Open Graph Description: Using google-api-python-client 2.2.0 and the GCP monitoring API, I received an error when retrieving the second page of a projects.timeSeries.query call: can't fetch data, reason: Invalid JSON payl...
X Description: Using google-api-python-client 2.2.0 and the GCP monitoring API, I received an error when retrieving the second page of a projects.timeSeries.query call: can't fetch data, reason: Invalid JSON ...
Opengraph URL: https://github.com/googleapis/google-api-python-client/issues/1403
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"_next method creates a HTTP request with wrong content-length header","articleBody":"Using google-api-python-client 2.2.0 and the GCP monitoring API, I received an error when retrieving the second page of a [projects.timeSeries.query](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/query) call:\r\n\r\n```\r\ncan't fetch data, reason: Invalid JSON payload received. Unexpected end of string. Expected an object key or }.\r\n```\r\n\r\nTurns out that the content-length header is wrong and doesn't match with the body with the additional pageToken field.\r\n\r\nThe problem is in https://github.com/googleapis/google-api-python-client/blob/master/googleapiclient/discovery.py#L1285: the body is replaced, but the content-length stays the same because it is only updated at Request object creation time. I will prepare a PR for this.","author":{"url":"https://github.com/schweikert","@type":"Person","name":"schweikert"},"datePublished":"2021-06-07T11:40:34Z","url":"https://github.com/googleapis/google-api-python-client/issues/1403"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:90975eb7-f266-7ce5-12d8-62ceeb93d127 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8936:11EACE:4BADF2:674A6F:6B00CE25 |
| html-safe-nonce | cd6bfa923623023be1ebdc9a3d388cf4f991a21361c553525fa0dca8ebf60e2c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTM2OjExRUFDRTo0QkFERjI6Njc0QTZGOjZCMDBDRTI1IiwidmlzaXRvcl9pZCI6IjQwNzI1ODQzNzA5Mjg1MzcxMjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 016daa30268a15ceae2f4ff01ff7e75ded4c2decb688211a23dcc7a53bfa3934 |
| hovercard-subject-tag | issue:913456662 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-api-python-client/1403/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8f2b7e1ccca17099329850bf42bfd27db3eb0fceea9fd8cad5ff1d5ccd10b253/googleapis/google-api-python-client/issues/1403 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8f2b7e1ccca17099329850bf42bfd27db3eb0fceea9fd8cad5ff1d5ccd10b253/googleapis/google-api-python-client/issues/1403 |
| og:image:alt | Using google-api-python-client 2.2.0 and the GCP monitoring API, I received an error when retrieving the second page of a projects.timeSeries.query call: can't fetch data, reason: Invalid JSON payl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | schweikert |
| hostname | github.com |
| expected-hostname | github.com |
| None | 85bbdfe2b6ba16e234513bc6ceff5d848ef8449820c900692a2b4e67061931e5 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-api-python-client git https://github.com/googleapis/google-api-python-client.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 15749269 |
| octolytics-dimension-repository_nwo | googleapis/google-api-python-client |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 15749269 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-api-python-client |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4943239a6d2c591325dad6e5c313e1cafda877f6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width