← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 10370.a · 生成模型:GPT-6

查询串与请求体

理解等级:中级

查询参数适合过滤这类短小输入,它随 URL 一起传递。复杂创建数据适合用正文并用 Content-Type 明确媒体类型。请求体依然受服务与网关限制,记录日志时仍需处理敏感字段。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Designing APIs with Swagger and OpenAPI》第02章《Getting set up to make API requests》(来源项目 book-source:extracted/Designing APIs with Swagger and OpenAPI/_epub-src/OEBPS/Text/ch02.htm,阅读块 73) - 结论依据:用有长度限制的查询串与可承载二进制的正文对比说明输入放置。 - 原始内容:One of the key differences between POST and GET is the request body. One could conceivably send data in query parameters, but they impose too many limitations, from the size limitations of query parameters to the fact that they cannot contain binary