重新创建由Request.Write持久化的http.Request。

huangapple go评论78阅读模式
英文:

Recreate http.Request persisted by Request.Write

问题

我有一个http.Request,我使用Request.Write将其写入文件。由于没有Request.Read或类似的方法,我想知道如何使用该文件重新创建一个http.Request

英文:

I have a http.Request which I wrote to a file using Request.Write. Since there is no Request.Read or similar, I was wondering how I can recreate a http.Request using the file.

答案1

得分: 3

你可以使用http.ReadRequest

英文:

You can use http.ReadRequest.

huangapple
  • 本文由 发表于 2016年3月16日 18:23:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/36032865.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定