python - 从 Microsoft Graph API 获取 414 请求 Uri 太长
问题描述
我使用 Microsoft Graph API 列出 Teams 班次。为此,我使用了list shift endpoint。响应可以分页,在我的情况下,有时我会得到一个@odata.nextLink
返回我的HTTP 414: Request-Uri Too Long
.
有什么我可以做的吗?
解决方案
这是已知问题。
您可以使用 JSON 批处理作为运行这些请求的解决方法,因为冗长的 URL 只是成为请求负载的一部分。
https://docs.microsoft.com/en-us/graph/json-batching#bypassing-url-length-limitations-with-batching
它将太长的 URL 移动到 POST 的正文中。
推荐阅读
- sql - 尝试填充维度表时出错
- node.js - 为什么即使 s3 存储桶是公共的并且 s3 url 工作正常,AWS cloudfront 仍会返回拒绝访问
- r - 如何在ggplot中绘制多条线段
- windows - 如何在 Docker yml 文件中运行 curl 命令?
- java - 出现错误“无法使用 Kubernetes 登录:无效的角色名称“abc-reader-xyz-cluster”;嵌套异常”
- php - 必须是数组类型,给定字符串
- node.js - s3.deleteObject 没有响应错误或成功
- node.js - 发送(节点快递)和接收数据(reactjs)
- bash - 如何重用`apt update`和`apt upgrade`命令的`apt up`部分在一行中按顺序执行
- routes - 如何在标记之间创建路线?