gpt4 book ai didi

api - 错误 414 - 请求的 URL 太大而无法处理

转载 作者:行者123 更新时间:2023-12-04 06:17:39 25 4
gpt4 key购买 nike

我在我的应用程序中使用 Google Chart API 并使用 URL“http://chart.apis.google.com”生成图表

我收到错误 “请求的 URL 太大而无法处理” ,当我为此 URL 提供大量参数时。

在这种情况下我能做什么?

最佳答案

Google Charts API FAQ提供以下建议:

Is there a limit on the URL length for the Google Chart API? What is the maximum URL length?

The maximum length of a URL is not determined by the Google Chart API, but rather by web browser and web server considerations. The longest URL that Google accepts in a chart GET request is 2048 characters in length, after URL-encoding (e.g., | becomes %7C). For POST, this limit is 16K.

If URL length is a problem, here are a few suggestions for shortening your URL:

  • If you are using a text encoding data format, remove leading zeros from numbers, remove trailing zeros after decimal points, and round or truncate the numbers after decimal points.
  • If that does not shorten the URL enough, use simple (1 character) or extended (2 character) encoding.
  • Sample data less frequently; i.e., reduce granularity.
  • Remove accoutrements and decorations, such as colors, labels, and styles, from your chart.


也发现了这一点,但似乎没有答案/解决方案。
http://groups.google.com/group/google-chart-api/browse_thread/thread/b47c1588b39d98ce

关于api - 错误 414 - 请求的 URL 太大而无法处理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7023235/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com