Skip to content

获取原始的content #187

Description

@wr960204

今天遇到个情况,就是对方给过来的数据contentType和真实的不一样,它说是UrlEncod的类型,实际是字符串类型。
但是咱们的代码UrlEncod是在接受阶段就做了解码,然后把原始数据流释放了。不一定能准确的还原出原始数据。

是否可以在接收数据阶段只做Stream的存储,给Request增加诸如:contentAsString(encoding : TEncoding),contentAsJSON,contentAsUrlEncod,contentAsBytes类似的方法。
在方法里面做转换。这样任何类型如果想要读原始直接访问这个数据流即可。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions