mirror of
https://github.com/syumai/workers.git
synced 2025-03-10 17:29:11 +00:00
add RawResponse getter to hono context
This commit is contained in:
parent
fa22eea00b
commit
8ea4e2bf5f
@ -45,6 +45,10 @@ func (c *Context) SetStatus(statusCode int) {
|
||||
c.ctxObj.Call("status", statusCode)
|
||||
}
|
||||
|
||||
func (c *Context) RawResponse() js.Value {
|
||||
return c.ctxObj.Get("res")
|
||||
}
|
||||
|
||||
func (c *Context) ResponseBody() io.ReadCloser {
|
||||
return jsutil.ConvertReadableStreamToReadCloser(c.ctxObj.Get("res").Get("body"))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user