我正在使用瘦来接收 HTTP POST 请求,我的服务器代码是这样的:
http_server = proc do |env|
# Want to make response dependent on content
response = "Hello World!"
[200, {"Connection" => "close", "Content-Length" => response.bytesize.to_s}, [response]]
end
设置断点,可以看到收到了content-type(json),以及内容长度,但是看不到实际的内容。如何从处理请求中检索内容?