mirror of
https://github.com/soypat/lneto.git
synced 2026-08-20 06:29:03 +00:00
add streaming API distinct from Exchange
This commit is contained in:
@@ -296,7 +296,9 @@ func TestRouterSplitRequest(t *testing.T) {
|
||||
|
||||
func staticPage(t *testing.T, page string) HandlerFunc {
|
||||
return func(ex *Exchange) {
|
||||
n, err := io.WriteString(ex, page)
|
||||
var rw ExchangeRW // Streaming APIs take the ReadWriter view.
|
||||
ex.ReadWriter(&rw)
|
||||
n, err := io.WriteString(&rw, page)
|
||||
// Handler runs on the router goroutine: Error, never Fatal.
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
|
||||
Reference in New Issue
Block a user