改造和 TypedInput

Retrofit and TypedInput

根据文档,TypedInputTypedOutput 类 仅用于将 MIME 类型绑定到数据。 当我们必须在请求中使用 TypedInput 时。 ??为什么我们在发出请求时需要这个映射

如果所有请求的 MIME 类型都一致,那么您就不必为 TypedInputTypedOutput 而烦恼。比方说,如果您的请求有 JSON 进出,您不应该考虑使用这些。但是如果你有混合请求,假设 , JSON and XML you should provide your own Converter 和不同请求的映射。