知识卡片

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

媒体类型指导解码

理解等级:中级

Content-Type 描述收到的消息体应按哪种格式解释。application/json、image/png 对应完全不同的读取方式。带 +json 的自定义媒体类型说明底层可用 JSON 解码,业务结构仍由其专门契约定义。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Designing APIs with Swagger and OpenAPI》第05章《Describing API responses》(来源项目 book-source:extracted/Designing APIs with Swagger and OpenAPI/_epub-src/OEBPS/Text/ch05.htm,阅读块 107) - 结论依据:原文将 Content-Type 和媒体类型注册联系起来。 - 原始内容:HTTP is a multimedia protocol, and it can handle requests and responses in many different formats. To indicate what format the data is in, it includes a header, typically Content-Type, with a media type as its value. Media types, or Multipurpose Internet