axetroy / axetroy/stackoverflow

Golang中,读取http request的body,只能读取一次

Open
#25 0 comments 0 reactions 0 assignees View on GitHub
后端开发
Dominant language
No language data
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Http Body是一个reader,一个读取流。

读取完就完了,意味着不能重复读取。

在一些框架上,想要重读解析是不行了。

如果需要,则需要复制流,但是这样一来,就凭空增加了内存的开销

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.